inspection fetch

This commit is contained in:
Julian Krauser 2025-07-09 12:57:37 +02:00
parent a0a8edf7af
commit 95b6cec66d
6 changed files with 189 additions and 21 deletions

View file

@ -3,13 +3,23 @@ import PermissionHelper from "../../../helpers/permissionHelper";
import {
createInspection,
deleteInspectionById,
getAllInspectionsSortedNotHavingNewer,
getAllInspectionsForRelated,
getInspectionById,
updateInspectionById,
getAllInspectionsRunning,
} from "../../../controller/admin/unit/inspectionController";
var router = express.Router({ mergeParams: true });
router.get("/next", async (req: Request, res: Response) => {
await getAllInspectionsSortedNotHavingNewer(req, res);
});
router.get("/running", async (req: Request, res: Response) => {
await getAllInspectionsRunning(req, res);
});
router.get(
["/vehicle/:relatedId", "/equipment/:relatedId", "/wearable/:relatedId"],
async (req: Request, res: Response) => {