update permission handling
This commit is contained in:
parent
c4e0c4fa28
commit
e9c3a30a41
2 changed files with 2 additions and 2 deletions
|
@ -51,7 +51,7 @@ router.get("/:id/:filename", async (req: Request, res: Response) => {
|
||||||
|
|
||||||
router.patch(
|
router.patch(
|
||||||
"/:id",
|
"/:id",
|
||||||
PermissionHelper.passCheckMiddleware("update", "unit", "inspection"),
|
PermissionHelper.passCheckMiddleware("update", "unit", "damage_report"),
|
||||||
async (req: Request, res: Response) => {
|
async (req: Request, res: Response) => {
|
||||||
await updateDamageReportById(req, res);
|
await updateDamageReportById(req, res);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ router.get("/:id", async (req: Request, res: Response) => {
|
||||||
|
|
||||||
router.patch(
|
router.patch(
|
||||||
"/:id",
|
"/:id",
|
||||||
PermissionHelper.passCheckMiddleware("update", "unit", "inspection"),
|
PermissionHelper.passCheckMiddleware("update", "unit", "maintenance"),
|
||||||
async (req: Request, res: Response) => {
|
async (req: Request, res: Response) => {
|
||||||
await updateMaintenanceById(req, res);
|
await updateMaintenanceById(req, res);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue