Conditions | 2 |
Total Lines | 13 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { |
||
28 | |||
29 | @Put(':id/refuse') |
||
30 | @Roles(UserRole.COOPERATOR) |
||
31 | @ApiOperation({title: 'Refuse holiday'}) |
||
32 | public async index(@Param() dto: IdDTO, @LoggedUser() user: User) { |
||
33 | try { |
||
34 | const id = await this.commandBus.execute( |
||
35 | new RefuseHolidayCommand(user, dto.id) |
||
36 | ); |
||
37 | |||
38 | return {id}; |
||
39 | } catch (e) { |
||
40 | throw new BadRequestException(e.message); |
||
41 | } |
||
44 |