Merge pull request #2608 from bluewave-labs/fix/route-specificity
fix: reorder rotues to correctly match
This commit is contained in:
1 file changed
+7
-11
@@ -20,17 +20,18 @@ class CheckRoutes {
|
|||||||
isAllowed(["admin", "superadmin"]),
|
isAllowed(["admin", "superadmin"]),
|
||||||
this.checkController.deleteChecksByTeamId
|
this.checkController.deleteChecksByTeamId
|
||||||
);
|
);
|
||||||
|
|
||||||
this.router.get("/:monitorId", this.checkController.getChecksByMonitor);
|
|
||||||
|
|
||||||
this.router.put(
|
this.router.put(
|
||||||
"/check/:checkId",
|
"/check/:checkId",
|
||||||
verifyTeamAccess(Check, "checkId"),
|
verifyTeamAccess(Check, "checkId"),
|
||||||
this.checkController.ackCheck
|
this.checkController.ackCheck
|
||||||
);
|
);
|
||||||
|
this.router.put(
|
||||||
|
"/team/ttl",
|
||||||
|
isAllowed(["admin", "superadmin"]),
|
||||||
|
this.checkController.updateChecksTTL
|
||||||
|
);
|
||||||
|
|
||||||
this.router.put("/:path/:monitorId?", this.checkController.ackAllChecks);
|
this.router.get("/:monitorId", this.checkController.getChecksByMonitor);
|
||||||
|
|
||||||
this.router.post(
|
this.router.post(
|
||||||
"/:monitorId",
|
"/:monitorId",
|
||||||
verifyOwnership(Monitor, "monitorId"),
|
verifyOwnership(Monitor, "monitorId"),
|
||||||
@@ -41,12 +42,7 @@ class CheckRoutes {
|
|||||||
verifyOwnership(Monitor, "monitorId"),
|
verifyOwnership(Monitor, "monitorId"),
|
||||||
this.checkController.deleteChecks
|
this.checkController.deleteChecks
|
||||||
);
|
);
|
||||||
|
this.router.put("/:path/:monitorId?", this.checkController.ackAllChecks);
|
||||||
this.router.put(
|
|
||||||
"/team/ttl",
|
|
||||||
isAllowed(["admin", "superadmin"]),
|
|
||||||
this.checkController.updateChecksTTL
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getRouter() {
|
getRouter() {
|
||||||
|
|||||||
Reference in new issue
Block a user