2024-12-24 11:58:56 -08:00
|
|
|
import { Router } from "express";
|
|
|
|
|
|
2024-11-11 12:17:55 +08:00
|
|
|
import { verifyJWT } from "../middleware/verifyJWT.js";
|
2024-12-24 11:58:56 -08:00
|
|
|
|
|
|
|
|
class StatusPageRoutes {
|
|
|
|
|
constructor(statusPageController) {
|
|
|
|
|
this.router = Router();
|
|
|
|
|
this.statusPageController = statusPageController;
|
|
|
|
|
this.initRoutes();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
initRoutes() {
|
|
|
|
|
this.router.get("/:url", this.statusPageController.getStatusPageByUrl);
|
|
|
|
|
this.router.post("/:url", verifyJWT, this.statusPageController.createStatusPage);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getRouter() {
|
|
|
|
|
return this.router;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default StatusPageRoutes;
|