mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-17 23:29:42 -06:00
Merge pull request #346 from bluewave-labs/fix/page-speed-route-delete-route
correcetd route and method for delete route
This commit is contained in:
@@ -9,13 +9,9 @@ const Monitor = require("../models/Monitor");
|
||||
* @param {string} monitorId - The ID of the monitor
|
||||
* @middleware verifyOwnership - Ensures the user owns the monitor
|
||||
*/
|
||||
router.post(
|
||||
"/:monitorId",
|
||||
verifyOwnership(Monitor, "monitorId"),
|
||||
() => {
|
||||
console.log("Create check");
|
||||
}
|
||||
);
|
||||
router.post("/:monitorId", verifyOwnership(Monitor, "monitorId"), () => {
|
||||
console.log("Create check");
|
||||
});
|
||||
|
||||
/**
|
||||
* @route GET /:monitorId
|
||||
@@ -24,13 +20,9 @@ router.post(
|
||||
* @param {string} monitorId - The ID of the monitor
|
||||
* @middleware verifyOwnership - Ensures the user owns the monitor
|
||||
*/
|
||||
router.get(
|
||||
"/:monitorId",
|
||||
verifyOwnership(Monitor, "monitorId"),
|
||||
() => {
|
||||
console.log("Get checks");
|
||||
}
|
||||
);
|
||||
router.get("/:monitorId", verifyOwnership(Monitor, "monitorId"), () => {
|
||||
console.log("Get checks");
|
||||
});
|
||||
|
||||
/**
|
||||
* @route POST /delete/:monitorId
|
||||
@@ -39,12 +31,8 @@ router.get(
|
||||
* @param {string} monitorId - The ID of the monitor
|
||||
* @middleware verifyOwnership - Ensures the user owns the monitor
|
||||
*/
|
||||
router.post(
|
||||
"/delete/:monitorId",
|
||||
verifyOwnership(Monitor, "monitorId"),
|
||||
() => {
|
||||
console.log("Delete checks");
|
||||
}
|
||||
);
|
||||
router.delete("/:monitorId", verifyOwnership(Monitor, "monitorId"), () => {
|
||||
console.log("Delete checks");
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
|
||||
Reference in New Issue
Block a user