VerifyTemAccess Middleware

This commit is contained in:
Br0wnHammer committed 2025-06-25 11:52:38 +05:30
1 parent 95b832c1c6
commit 78a2e5d106
4 files changed
+17 -15

No files matched your search

+3 -1
View File
@@ -1,7 +1,9 @@
import { Router } from "express";
import { verifyOwnership } from "../middleware/verifyOwnership.js";
import { verifyTeamAccess } from "../middleware/verifyTeamAccess.js";
import { isAllowed } from "../middleware/isAllowed.js";
import Monitor from "../db/models/Monitor.js";
import Check from "../db/models/Check.js";
class CheckRoutes {
constructor(checkController) {
@@ -20,7 +22,7 @@ class CheckRoutes {
this.router.get("/:monitorId", this.checkController.getChecksByMonitor);
this.router.put("/:checkId", this.checkController.ackCheck);
this.router.put("/:checkId", verifyTeamAccess(Check, "checkId"), this.checkController.ackCheck);
this.router.put("/:path/:monitorId?", this.checkController.ackAllChecks);