This commit is contained in:
@@ -18,7 +18,7 @@ export class PrintController {
|
|||||||
/*================================ Section ========================== */
|
/*================================ Section ========================== */
|
||||||
|
|
||||||
@Post('section')
|
@Post('section')
|
||||||
@Permissions(PermissionEnum.MANAGE_PRINT)
|
@Permissions(PermissionEnum.VIEW_PRINT)
|
||||||
@ApiOperation({ summary: 'Create section' })
|
@ApiOperation({ summary: 'Create section' })
|
||||||
create(@Body() dto: CreateSectionDto) {
|
create(@Body() dto: CreateSectionDto) {
|
||||||
return this.printService.create(dto);
|
return this.printService.create(dto);
|
||||||
@@ -26,25 +26,27 @@ export class PrintController {
|
|||||||
|
|
||||||
@Get('section')
|
@Get('section')
|
||||||
@ApiOperation({ summary: 'find all section' })
|
@ApiOperation({ summary: 'find all section' })
|
||||||
|
@Permissions(PermissionEnum.VIEW_PRINT)
|
||||||
findAll() {
|
findAll() {
|
||||||
return this.printService.findAll();
|
return this.printService.findAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get('section/:id')
|
@Get('section/:id')
|
||||||
@ApiOperation({ summary: 'Find one section' })
|
@ApiOperation({ summary: 'Find one section' })
|
||||||
|
@Permissions(PermissionEnum.VIEW_PRINT)
|
||||||
findOne(@Param('id') id: string) {
|
findOne(@Param('id') id: string) {
|
||||||
return this.printService.finOrFail(id);
|
return this.printService.finOrFail(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Patch('section/:id')
|
@Patch('section/:id')
|
||||||
@Permissions(PermissionEnum.MANAGE_PRINT)
|
@Permissions(PermissionEnum.VIEW_PRINT)
|
||||||
@ApiOperation({ summary: 'Update section' })
|
@ApiOperation({ summary: 'Update section' })
|
||||||
update(@Param('id') id: string, @Body() dto: UpdateSectionDto) {
|
update(@Param('id') id: string, @Body() dto: UpdateSectionDto) {
|
||||||
return this.printService.update(id, dto);
|
return this.printService.update(id, dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Delete('section/:id')
|
@Delete('section/:id')
|
||||||
@Permissions(PermissionEnum.MANAGE_PRINT)
|
@Permissions(PermissionEnum.VIEW_PRINT)
|
||||||
@ApiOperation({ summary: 'Remove section' })
|
@ApiOperation({ summary: 'Remove section' })
|
||||||
remove(@Param('id') id: string) {
|
remove(@Param('id') id: string) {
|
||||||
return this.printService.remove(id);
|
return this.printService.remove(id);
|
||||||
|
|||||||
Reference in New Issue
Block a user