restore repo structure

This commit is contained in:
Alex Holliday committed 2025-04-20 11:29:53 -07:00
1 parent 6df099a5b6
commit 8b7e3c650b
592 files changed
+37663 -127

No files matched your search

+46
View File
@@ -0,0 +1,46 @@
import { Router } from "express";
import { verifyJWT } from "../middleware/verifyJWT.js";
import multer from "multer";
const upload = multer();
class StatusPageRoutes {
constructor(statusPageController) {
this.router = Router();
this.statusPageController = statusPageController;
this.initRoutes();
}
initRoutes() {
this.router.get("/", this.statusPageController.getStatusPage);
this.router.get(
"/team/:teamId",
verifyJWT,
this.statusPageController.getStatusPagesByTeamId
);
this.router.get("/:url", this.statusPageController.getStatusPageByUrl);
this.router.get(
"/distributed/:url",
this.statusPageController.getDistributedStatusPageByUrl
);
this.router.post(
"/",
upload.single("logo"),
verifyJWT,
this.statusPageController.createStatusPage
);
this.router.put(
"/",
upload.single("logo"),
verifyJWT,
this.statusPageController.updateStatusPage
);
this.router.delete("/:url(*)", verifyJWT, this.statusPageController.deleteStatusPage);
}
getRouter() {
return this.router;
}
}
export default StatusPageRoutes;