notifications

This commit is contained in:
Alex Holliday committed 2026-03-20 11:45:04 -07:00
1 parent 0495bef469
commit c7e449d18c
2 files changed
+13 -3

No files matched your search

@@ -15,7 +15,16 @@ import { requireTeamId, requireUserId } from "./controllerUtils.js";
const SERVICE_NAME = "NotificationController"; const SERVICE_NAME = "NotificationController";
class NotificationController { export interface INotificationController {
testNotification: (req: Request, res: Response, next: NextFunction) => Promise<Response | void>;
createNotification: (req: Request, res: Response, next: NextFunction) => Promise<Response | void>;
getNotificationsByTeamId: (req: Request, res: Response, next: NextFunction) => Promise<Response | void>;
deleteNotification: (req: Request, res: Response, next: NextFunction) => Promise<Response | void>;
getNotificationById: (req: Request, res: Response, next: NextFunction) => Promise<Response | void>;
editNotification: (req: Request, res: Response, next: NextFunction) => Promise<Response | void>;
testAllNotifications: (req: Request, res: Response, next: NextFunction) => Promise<Response | void>;
}
class NotificationController implements INotificationController {
private notificationsService: INotificationsService; private notificationsService: INotificationsService;
private monitorsRepository: IMonitorsRepository; private monitorsRepository: IMonitorsRepository;
constructor(notificationsService: INotificationsService, monitorsRepository: IMonitorsRepository) { constructor(notificationsService: INotificationsService, monitorsRepository: IMonitorsRepository) {
+3 -2
View File
@@ -1,9 +1,10 @@
import { INotificationController } from "@/controllers/notificationController.js";
import { Router } from "express"; import { Router } from "express";
class NotificationRoutes { class NotificationRoutes {
private router: Router; private router: Router;
private notificationController: any; private notificationController: INotificationController;
constructor(notificationController: any) { constructor(notificationController: INotificationController) {
this.router = Router(); this.router = Router();
this.notificationController = notificationController; this.notificationController = notificationController;
this.initializeRoutes(); this.initializeRoutes();