Merge branch 'develop' into 915-be-add-new-endpoint-for-refreshing-access-token

This commit is contained in:
Rushi Gandhi committed 2024-10-22 10:26:49 +05:30
commit af685f3c8b
216 files changed
+34332 -31888

No files matched your search

+8 -16
View File
@@ -1,11 +1,11 @@
import { Router } from "express";
import {
createCheck,
getChecks,
deleteChecks,
getTeamChecks,
deleteChecksByTeamId,
updateChecksTTL,
createCheck,
getChecks,
deleteChecks,
getTeamChecks,
deleteChecksByTeamId,
updateChecksTTL,
} from "../controllers/checkController.js";
import { verifyOwnership } from "../middleware/verifyOwnership.js";
import { isAllowed } from "../middleware/isAllowed.js";
@@ -15,19 +15,11 @@ const router = Router();
router.get("/:monitorId", getChecks);
router.post("/:monitorId", verifyOwnership(Monitor, "monitorId"), createCheck);
router.delete(
"/:monitorId",
verifyOwnership(Monitor, "monitorId"),
deleteChecks
);
router.delete("/:monitorId", verifyOwnership(Monitor, "monitorId"), deleteChecks);
router.get("/team/:teamId", getTeamChecks);
router.delete(
"/team/:teamId",
isAllowed(["admin", "superadmin"]),
deleteChecksByTeamId
);
router.delete("/team/:teamId", isAllowed(["admin", "superadmin"]), deleteChecksByTeamId);
router.put("/team/ttl", isAllowed(["admin", "superadmin"]), updateChecksTTL);
+3 -8
View File
@@ -2,18 +2,13 @@ import { Router } from "express";
import { verifyJWT } from "../middleware/verifyJWT.js";
import { isAllowed } from "../middleware/isAllowed.js";
import {
issueInvitation,
inviteVerifyController,
issueInvitation,
inviteVerifyController,
} from "../controllers/inviteController.js";
const router = Router();
router.post(
"/",
isAllowed(["admin", "superadmin"]),
verifyJWT,
issueInvitation
);
router.post("/", isAllowed(["admin", "superadmin"]), verifyJWT, issueInvitation);
router.post("/verify", issueInvitation);
export default router;
+9 -9
View File
@@ -1,11 +1,11 @@
import { Router } from "express";
import {
createMaintenanceWindows,
getMaintenanceWindowById,
getMaintenanceWindowsByTeamId,
getMaintenanceWindowsByMonitorId,
deleteMaintenanceWindow,
editMaintenanceWindow,
createMaintenanceWindows,
getMaintenanceWindowById,
getMaintenanceWindowsByTeamId,
getMaintenanceWindowsByMonitorId,
deleteMaintenanceWindow,
editMaintenanceWindow,
} from "../controllers/maintenanceWindowController.js";
import { verifyOwnership } from "../middleware/verifyOwnership.js";
import Monitor from "../db/models/Monitor.js";
@@ -15,9 +15,9 @@ const router = Router();
router.post("/", createMaintenanceWindows);
router.get(
"/monitor/:monitorId",
verifyOwnership(Monitor, "monitorId"),
getMaintenanceWindowsByMonitorId
"/monitor/:monitorId",
verifyOwnership(Monitor, "monitorId"),
getMaintenanceWindowsByMonitorId
);
router.get("/team/", getMaintenanceWindowsByTeamId);
+26 -15
View File
@@ -1,17 +1,18 @@
import { Router } from "express";
import {
getAllMonitors,
getMonitorStatsById,
getMonitorCertificate,
getMonitorById,
getMonitorsAndSummaryByTeamId,
getMonitorsByTeamId,
createMonitor,
deleteMonitor,
deleteAllMonitors,
editMonitor,
pauseMonitor,
addDemoMonitors,
getAllMonitors,
getMonitorStatsById,
getMonitorCertificate,
getMonitorById,
getMonitorsAndSummaryByTeamId,
getMonitorsByTeamId,
createMonitor,
checkEndpointResolution,
deleteMonitor,
deleteAllMonitors,
editMonitor,
pauseMonitor,
addDemoMonitors,
} from "../controllers/monitorController.js";
import { isAllowed } from "../middleware/isAllowed.js";
import { fetchMonitorCertificate } from "../controllers/controllerUtils.js";
@@ -21,15 +22,25 @@ const router = Router();
router.get("/", getAllMonitors);
router.get("/stats/:monitorId", getMonitorStatsById);
router.get("/certificate/:monitorId", (req, res, next) => {
getMonitorCertificate(req, res, next, fetchMonitorCertificate);
getMonitorCertificate(req, res, next, fetchMonitorCertificate);
});
router.get("/:monitorId", getMonitorById);
router.get("/team/summary/:teamId", getMonitorsAndSummaryByTeamId);
router.get("/team/:teamId", getMonitorsByTeamId);
router.post("/", isAllowed(["admin", "superadmin"]), createMonitor);
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);
+4 -4
View File
@@ -1,9 +1,9 @@
import { Router } from "express";
import {
getMetrics,
getJobs,
addJob,
obliterateQueue,
getMetrics,
getJobs,
addJob,
obliterateQueue,
} from "../controllers/queueController.js";
const router = Router();
+1 -4
View File
@@ -1,8 +1,5 @@
import { Router } from "express";
import {
getAppSettings,
updateAppSettings,
} from "../controllers/settingsController.js";
import { getAppSettings, updateAppSettings } from "../controllers/settingsController.js";
import { isAllowed } from "../middleware/isAllowed.js";
const router = Router();