MCPcopy Create free account
hub / github.com/bsoc-bitbyte/busify / createNewContractor

Method createNewContractor

backend/src/Bus/bus.controller.ts:92–100  ·  view source on GitHub ↗
(@Body() contractor: ContractorDto)

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls 1

createContractorMethod · 0.80

Tested by

no test coverage detected