(@Body() contractor: ContractorDto)
| 90 | @UseGuards(JwtAuthGuard, AdminGuard) |
| 91 | @Post('contractor') |
| 92 | async createNewContractor(@Body() contractor: ContractorDto) { |
| 93 | try { |
| 94 | return this.busService.createContractor(contractor); |
| 95 | } catch (error) { |
| 96 | if (error instanceof HttpException) { |
| 97 | throw new HttpException(error.message, error.getStatus()); |
| 98 | } |
| 99 | } |
| 100 | } |
| 101 | @UseGuards(JwtAuthGuard, AdminGuard) |
| 102 | @Delete('contractor/:id') |
| 103 | async removeContractor(@Body() contractorId: string) { |
nothing calls this directly
no test coverage detected