mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-04-28 04:29:27 -05:00
39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
const router = require("express").Router();
|
|
const { verifyOwnership } = require("../middleware/verifyOwnership");
|
|
const Monitor = require("../models/Monitor");
|
|
|
|
/**
|
|
* @route POST /:monitorId
|
|
* @description Create a new PageSpeedCheck for a monitor
|
|
* @access Private
|
|
* @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");
|
|
});
|
|
|
|
/**
|
|
* @route GET /:monitorId
|
|
* @description Get all PageSpeedChecks for a monitor
|
|
* @access Private
|
|
* @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");
|
|
});
|
|
|
|
/**
|
|
* @route POST /delete/:monitorId
|
|
* @description Delete all PageSpeedChecks for a monitor
|
|
* @access Private
|
|
* @param {string} monitorId - The ID of the monitor
|
|
* @middleware verifyOwnership - Ensures the user owns the monitor
|
|
*/
|
|
router.delete("/:monitorId", verifyOwnership(Monitor, "monitorId"), () => {
|
|
console.log("Delete checks");
|
|
});
|
|
|
|
module.exports = router;
|