(@Body() bus: BusDto)
| 35 | @UseGuards(JwtAuthGuard, AdminGuard) |
| 36 | @Post('bus') |
| 37 | async createNewBus(@Body() bus: BusDto) { |
| 38 | try { |
| 39 | return this.busService.createBus(bus); |
| 40 | } catch (error) { |
| 41 | if (error instanceof HttpException) { |
| 42 | throw new HttpException(error.message, error.getStatus()); |
| 43 | } |
| 44 | } |
| 45 | } |
| 46 | @UseGuards(JwtAuthGuard, AdminGuard) |
| 47 | @Get('conductor') |
| 48 | async getAllConductors() { |