Update Submodules

This commit is contained in:
2026-04-15 17:33:44 +02:00
parent 6b68570e46
commit 2a99323c91
4 changed files with 56 additions and 12 deletions
+17 -5
View File
@@ -1,9 +1,10 @@
import { Controller, Get, Inject, Param } from '@nestjs/common';
import { Body, Controller, Get, Inject, Param, Post } from '@nestjs/common';
import { FormularService } from './formular.service';
import { Query } from '@nestjs/graphql';
import { Formular, MyField } from 'src/dto/formular.dto';
import { FormularEntity } from './formular.entity';
import { FieldEntity } from './fields.entity';
import { ApiBody } from '@nestjs/swagger';
@Controller('/api/formulare')
export class FormularController {
@@ -27,12 +28,23 @@ export class FormularController {
return await this.formularService.getFields(formularid);
}
@Get("/submit/:formularid")
@Post("/submit/:formularid")
@ApiBody({
schema: {
type: 'object',
additionalProperties: {
type: 'string',
},
},
})
async submit(
@Param("formularid")
formularid:number
){
return await this.formularService.submit(formularid);
formularid:number,
@Body()
body:any
): Promise<boolean>{
return await this.formularService.submit(<number>formularid,Object.keys(body),Object.values(body));
}
}