Got rid context bind in the route.
This commit is contained in:
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) {
|
||||||
|
|||||||
@@ -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
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user