Got rid context bind in the route.

This commit is contained in:
Skorpios committed 2025-02-12 21:22:44 -08:00
1 parent 70ffe1b661
commit 12d9f154bf
2 files changed
+2 -1

No files matched your search

@@ -2,6 +2,7 @@
class NotificationController { class NotificationController {
constructor(notificationService) { constructor(notificationService) {
this.notificationService = notificationService; this.notificationService = notificationService;
this.triggerNotification = this.triggerNotification.bind(this);
} }
async triggerNotification(req, res, next) { async triggerNotification(req, res, next) {
+1 -1
View File
@@ -36,7 +36,7 @@ class NotificationRoutes {
'/trigger', '/trigger',
verifyJWT, verifyJWT,
this.validateRequest(triggerNotificationBodyValidation), this.validateRequest(triggerNotificationBodyValidation),
this.notificationController.triggerNotification.bind(this.notificationController) this.notificationController.triggerNotification
); );
} }