| Conditions | 2 |
| Total Lines | 9 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import {Controller, Get, Inject, Param, UseGuards, NotFoundException} from '@nestjs/common'; |
||
| 20 | |||
| 21 | @Get(':id') |
||
| 22 | @Roles(UserRole.COOPERATOR) |
||
| 23 | @ApiOperation({summary: 'Get user'}) |
||
| 24 | public async index(@Param() dto: IdDTO): Promise<UserAdministrativeView> { |
||
| 25 | try { |
||
| 26 | return await this.queryBus.execute(new GetUserAdministrativeByIdQuery(dto.id)); |
||
| 27 | } catch (e) { |
||
| 28 | throw new NotFoundException(e.message); |
||
| 29 | } |
||
| 32 |