mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 05:30:55 +00:00
fix
This commit is contained in:
@@ -14,13 +14,17 @@ import { FleetManage, FleetView } from '../../common/booking-guards';
|
||||
import { DriversService } from './drivers.service';
|
||||
import { CreateDriverDto } from './dto/create-driver.dto';
|
||||
import { UpdateDriverDto } from './dto/update-driver.dto';
|
||||
import { FleetHistoryService } from '../fleet-history/fleet-history.service';
|
||||
|
||||
@ApiTags('drivers')
|
||||
@ApiBearerAuth()
|
||||
@Controller('drivers')
|
||||
@FleetView()
|
||||
export class DriversController {
|
||||
constructor(private readonly driversService: DriversService) {}
|
||||
constructor(
|
||||
private readonly driversService: DriversService,
|
||||
private readonly fleetHistory: FleetHistoryService,
|
||||
) {}
|
||||
|
||||
@Post()
|
||||
@FleetManage()
|
||||
@@ -55,6 +59,12 @@ export class DriversController {
|
||||
return this.driversService.findById(id);
|
||||
}
|
||||
|
||||
@Get(':id/history')
|
||||
@ApiOperation({ summary: 'Get driver assignment & activity history' })
|
||||
history(@Param('id', ParseUUIDPipe) id: string) {
|
||||
return this.fleetHistory.getDriverHistory(id);
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
@FleetManage()
|
||||
@ApiOperation({ summary: 'Update a driver' })
|
||||
|
||||
Reference in New Issue
Block a user