mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-05-05 07:59:30 -05:00
30 lines
708 B
JavaScript
Executable File
30 lines
708 B
JavaScript
Executable File
import { Router } from "express";
|
|
import { verifyJWT } from "../middleware/verifyJWT.js";
|
|
|
|
class NotificationRoutes {
|
|
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
|
|
);
|
|
}
|
|
|
|
getRouter() {
|
|
return this.router;
|
|
}
|
|
}
|
|
|
|
export default NotificationRoutes; |