Add route for getAllMonitorsWithUptimeStats
This commit is contained in:
1 parent
33e88642b3
commit
21de95b89a
1 file changed
+4
-6
@@ -1,6 +1,7 @@
|
||||
import { Router } from "express";
|
||||
import {
|
||||
getAllMonitors,
|
||||
getAllMonitorsWithUptimeStats,
|
||||
getMonitorStatsById,
|
||||
getMonitorCertificate,
|
||||
getMonitorById,
|
||||
@@ -20,6 +21,7 @@ import { fetchMonitorCertificate } from "../controllers/controllerUtils.js";
|
||||
const router = Router();
|
||||
|
||||
router.get("/", getAllMonitors);
|
||||
router.get("/uptime", getAllMonitorsWithUptimeStats);
|
||||
router.get("/stats/:monitorId", getMonitorStatsById);
|
||||
router.get("/certificate/:monitorId", (req, res, next) => {
|
||||
getMonitorCertificate(req, res, next, fetchMonitorCertificate);
|
||||
@@ -32,14 +34,10 @@ router.get(
|
||||
"/resolution/url",
|
||||
isAllowed(["admin", "superadmin"]),
|
||||
checkEndpointResolution
|
||||
)
|
||||
|
||||
router.delete(
|
||||
"/:monitorId",
|
||||
isAllowed(["admin", "superadmin"]),
|
||||
deleteMonitor
|
||||
);
|
||||
|
||||
router.delete("/:monitorId", isAllowed(["admin", "superadmin"]), deleteMonitor);
|
||||
|
||||
router.post("/", isAllowed(["admin", "superadmin"]), createMonitor);
|
||||
|
||||
router.put("/:monitorId", isAllowed(["admin", "superadmin"]), editMonitor);
|
||||
|
||||
Reference in new issue
Block a user