fix languages

This commit is contained in:
root
2026-05-22 02:20:20 -04:00
parent cc462e2c01
commit 191fb3cb4e
25 changed files with 134 additions and 126 deletions
@@ -123,7 +123,7 @@ router.delete('/:id/calendar/blocks/:blockId', requireRole('MANAGER'), async (re
router.get('/:id/maintenance', async (req, res, next) => {
try {
const { id } = parseParams(idParamSchema, req)
const logs = await service.getMaintenanceLogs(id)
const logs = await service.getMaintenanceLogs(id, req.companyId)
ok(res, logs)
} catch (err) { next(err) }
})
@@ -110,7 +110,9 @@ export async function deleteCalendarBlock(vehicleId: string, companyId: string,
await repo.deleteCalendarBlock(blockId, vehicleId)
}
export async function getMaintenanceLogs(id: string) {
export async function getMaintenanceLogs(id: string, companyId: string) {
const vehicle = await repo.findById(id, companyId)
if (!vehicle) throw new NotFoundError('Vehicle not found')
return repo.findMaintenanceLogs(id)
}