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();