From c7e449d18c21fe2785da2be1c91731c8e77313bc Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Fri, 20 Mar 2026 11:45:04 -0700 Subject: [PATCH] notifications --- server/src/controllers/notificationController.ts | 11 ++++++++++- server/src/routes/notificationRoute.ts | 5 +++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/server/src/controllers/notificationController.ts b/server/src/controllers/notificationController.ts index 9c39daee7..979e4afc9 100644 --- a/server/src/controllers/notificationController.ts +++ b/server/src/controllers/notificationController.ts @@ -15,7 +15,16 @@ import { requireTeamId, requireUserId } from "./controllerUtils.js"; const SERVICE_NAME = "NotificationController"; -class NotificationController { +export interface INotificationController { + testNotification: (req: Request, res: Response, next: NextFunction) => Promise; + createNotification: (req: Request, res: Response, next: NextFunction) => Promise; + getNotificationsByTeamId: (req: Request, res: Response, next: NextFunction) => Promise; + deleteNotification: (req: Request, res: Response, next: NextFunction) => Promise; + getNotificationById: (req: Request, res: Response, next: NextFunction) => Promise; + editNotification: (req: Request, res: Response, next: NextFunction) => Promise; + testAllNotifications: (req: Request, res: Response, next: NextFunction) => Promise; +} +class NotificationController implements INotificationController { private notificationsService: INotificationsService; private monitorsRepository: IMonitorsRepository; constructor(notificationsService: INotificationsService, monitorsRepository: IMonitorsRepository) { diff --git a/server/src/routes/notificationRoute.ts b/server/src/routes/notificationRoute.ts index a1802d3b9..4ec6ce3b6 100755 --- a/server/src/routes/notificationRoute.ts +++ b/server/src/routes/notificationRoute.ts @@ -1,9 +1,10 @@ +import { INotificationController } from "@/controllers/notificationController.js"; import { Router } from "express"; class NotificationRoutes { private router: Router; - private notificationController: any; + private notificationController: INotificationController; - constructor(notificationController: any) { + constructor(notificationController: INotificationController) { this.router = Router(); this.notificationController = notificationController; this.initializeRoutes();