Skip to content

Commit

Permalink
Got rid context bind in the route.
Browse files Browse the repository at this point in the history
  • Loading branch information
Skorpios604 committed Feb 13, 2025
1 parent 70ffe1b commit 12d9f15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Server/controllers/notificationController.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
class NotificationController {
constructor(notificationService) {
this.notificationService = notificationService;
this.triggerNotification = this.triggerNotification.bind(this);
}

async triggerNotification(req, res, next) {
Expand Down
2 changes: 1 addition & 1 deletion Server/routes/notificationRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class NotificationRoutes {
'/trigger',
verifyJWT,

Check failure

Code scanning / CodeQL

Missing rate limiting High

This route handler performs
authorization
, but is not rate-limited.
this.validateRequest(triggerNotificationBodyValidation),
this.notificationController.triggerNotification.bind(this.notificationController)
this.notificationController.triggerNotification
);
}

Expand Down

0 comments on commit 12d9f15

Please sign in to comment.