format
This commit is contained in:
1 parent
c02ba84864
commit
c119df1553
7 files changed
+198
-193
No files matched your search
@@ -2,29 +2,23 @@ import { Router } from "express";
|
||||
import { verifyJWT } from "../middleware/verifyJWT.js";
|
||||
|
||||
class NotificationRoutes {
|
||||
constructor(notificationController) {
|
||||
this.router = Router();
|
||||
this.notificationController = notificationController;
|
||||
this.initializeRoutes();
|
||||
}
|
||||
constructor(notificationController) {
|
||||
this.router = Router();
|
||||
this.notificationController = notificationController;
|
||||
this.initializeRoutes();
|
||||
}
|
||||
|
||||
initializeRoutes() {
|
||||
this.router.use(verifyJWT);
|
||||
|
||||
this.router.post(
|
||||
"/trigger",
|
||||
this.notificationController.triggerNotification
|
||||
);
|
||||
|
||||
this.router.post(
|
||||
"/test-webhook",
|
||||
this.notificationController.testWebhook
|
||||
);
|
||||
}
|
||||
initializeRoutes() {
|
||||
this.router.use(verifyJWT);
|
||||
|
||||
getRouter() {
|
||||
return this.router;
|
||||
}
|
||||
this.router.post("/trigger", this.notificationController.triggerNotification);
|
||||
|
||||
this.router.post("/test-webhook", this.notificationController.testWebhook);
|
||||
}
|
||||
|
||||
getRouter() {
|
||||
return this.router;
|
||||
}
|
||||
}
|
||||
|
||||
export default NotificationRoutes;
|
||||
export default NotificationRoutes;
|
||||
Reference in new issue
Block a user