2025-04-20 11:29:53 -07:00
|
|
|
import { Router } from "express";
|
|
|
|
|
import { verifyJWT } from "../middleware/verifyJWT.js";
|
|
|
|
|
|
|
|
|
|
class NotificationRoutes {
|
2025-06-01 11:55:16 -07:00
|
|
|
constructor(notificationController) {
|
|
|
|
|
this.router = Router();
|
|
|
|
|
this.notificationController = notificationController;
|
|
|
|
|
this.initializeRoutes();
|
|
|
|
|
}
|
2025-04-20 11:29:53 -07:00
|
|
|
|
2025-06-01 11:55:16 -07:00
|
|
|
initializeRoutes() {
|
|
|
|
|
this.router.use(verifyJWT);
|
2025-04-20 11:29:53 -07:00
|
|
|
|
2025-06-01 11:55:16 -07:00
|
|
|
this.router.post("/trigger", this.notificationController.triggerNotification);
|
|
|
|
|
|
|
|
|
|
this.router.post("/test-webhook", this.notificationController.testWebhook);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getRouter() {
|
|
|
|
|
return this.router;
|
|
|
|
|
}
|
2025-04-20 11:29:53 -07:00
|
|
|
}
|
|
|
|
|
|
2025-06-01 11:55:16 -07:00
|
|
|
export default NotificationRoutes;
|