mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 21:20:57 +00:00
Merge branch 'freight/hot_fix' of github.com:Tria-plc/edr-platform into freight/hot_fix
This commit is contained in:
@@ -14,6 +14,12 @@ export class FuelController {
|
||||
return this.fuelService.recordFuelPurchase(dto);
|
||||
}
|
||||
|
||||
@Get('purchases')
|
||||
@ApiOperation({ summary: 'Get all fuel purchases' })
|
||||
async getAllFuelPurchases() {
|
||||
return this.fuelService.getAllFuelPurchases();
|
||||
}
|
||||
|
||||
@Get('purchases/:vehicleId')
|
||||
@ApiOperation({ summary: 'Get fuel purchases for vehicle' })
|
||||
async getFuelPurchases(
|
||||
|
||||
@@ -30,6 +30,10 @@ export class FuelService {
|
||||
return saved;
|
||||
}
|
||||
|
||||
async getAllFuelPurchases(): Promise<FuelPurchase[]> {
|
||||
return this.purchaseRepository.find({ order: { purchaseDate: 'DESC' } });
|
||||
}
|
||||
|
||||
async getFuelPurchases(
|
||||
vehicleId: string,
|
||||
startDate: Date,
|
||||
|
||||
Reference in New Issue
Block a user