Files
Checkmate/server/routes/notificationRoute.js
T

32 lines
949 B
JavaScript
Raw Normal View History

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-10 12:07:31 +08:00
this.router.post("/test", this.notificationController.testNotification);
2025-06-16 12:17:22 +08:00
this.router.post("/test/all", this.notificationController.testAllNotifications);
2025-06-09 10:25:06 +08:00
this.router.post("/", this.notificationController.createNotification);
this.router.get("/team", this.notificationController.getNotificationsByTeamId);
2025-06-09 10:25:06 +08:00
this.router.delete("/:id", this.notificationController.deleteNotification);
2025-06-10 11:13:19 +08:00
this.router.get("/:id", this.notificationController.getNotificationById);
this.router.put("/:id", this.notificationController.editNotification);
2025-06-01 11:55:16 -07:00
}
getRouter() {
return this.router;
}
2025-04-20 11:29:53 -07:00
}
2025-06-01 11:55:16 -07:00
export default NotificationRoutes;