routes -> ts

This commit is contained in:
Alex Holliday committed 2026-01-21 10:36:03 -08:00
1 parent 35488fed3e
commit 81c7c992e2
13 files changed
+74 -42

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
import { Router } from "express";
class NotificationRoutes {
private router: Router;
private notificationController: any;
constructor(notificationController: any) {
this.router = Router();
this.notificationController = notificationController;
this.initializeRoutes();
}
initializeRoutes() {
this.router.post("/", this.notificationController.createNotification);
this.router.post("/test/all", this.notificationController.testAllNotifications);
this.router.post("/test", this.notificationController.testNotification);
this.router.get("/team", this.notificationController.getNotificationsByTeamId);
this.router.get("/:id", this.notificationController.getNotificationById);
this.router.delete("/:id", this.notificationController.deleteNotification);
this.router.put("/:id", this.notificationController.editNotification);
}
getRouter() {
return this.router;
}
}
export default NotificationRoutes;