update status-page backend
This commit is contained in:
1 parent
27ec0eabb2
commit
d853c50840
5 files changed
+68
-24
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import { Router } from "express";
|
||||
|
||||
import { verifyJWT } from "../middleware/verifyJWT.js";
|
||||
import multer from "multer";
|
||||
const upload = multer();
|
||||
|
||||
class StatusPageRoutes {
|
||||
constructor(statusPageController) {
|
||||
@@ -10,8 +11,13 @@ class StatusPageRoutes {
|
||||
}
|
||||
|
||||
initRoutes() {
|
||||
this.router.get("/:url", this.statusPageController.getStatusPageByUrl);
|
||||
this.router.post("/:url", verifyJWT, this.statusPageController.createStatusPage);
|
||||
this.router.get("/", this.statusPageController.getStatusPage);
|
||||
this.router.post(
|
||||
"/",
|
||||
upload.single("logo"),
|
||||
verifyJWT,
|
||||
this.statusPageController.createStatusPage
|
||||
);
|
||||
}
|
||||
|
||||
getRouter() {
|
||||
|
||||
Reference in new issue
Block a user