feat: Add Model gestion for piece and component
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
|
||||
import {
|
||||
Controller,
|
||||
Get,
|
||||
Post,
|
||||
Body,
|
||||
Patch,
|
||||
Param,
|
||||
Delete,
|
||||
} from '@nestjs/common';
|
||||
import { CustomFieldsService } from './custom-fields.service';
|
||||
import {
|
||||
CreateCustomFieldValueDto,
|
||||
@@ -12,8 +20,12 @@ export class CustomFieldsController {
|
||||
constructor(private readonly customFieldsService: CustomFieldsService) {}
|
||||
|
||||
@Post('values')
|
||||
createCustomFieldValue(@Body() createCustomFieldValueDto: CreateCustomFieldValueDto) {
|
||||
return this.customFieldsService.createCustomFieldValue(createCustomFieldValueDto);
|
||||
createCustomFieldValue(
|
||||
@Body() createCustomFieldValueDto: CreateCustomFieldValueDto,
|
||||
) {
|
||||
return this.customFieldsService.createCustomFieldValue(
|
||||
createCustomFieldValueDto,
|
||||
);
|
||||
}
|
||||
|
||||
@Get('values/:entityType/:entityId')
|
||||
@@ -34,7 +46,10 @@ export class CustomFieldsController {
|
||||
@Param('id') id: string,
|
||||
@Body() updateCustomFieldValueDto: UpdateCustomFieldValueDto,
|
||||
) {
|
||||
return this.customFieldsService.updateCustomFieldValue(id, updateCustomFieldValueDto);
|
||||
return this.customFieldsService.updateCustomFieldValue(
|
||||
id,
|
||||
updateCustomFieldValueDto,
|
||||
);
|
||||
}
|
||||
|
||||
@Delete('values/:id')
|
||||
@@ -51,4 +66,4 @@ export class CustomFieldsController {
|
||||
body.value,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user