Created new route for nickname sync actions#1981
Open
Pavangbhat wants to merge 8 commits intodevelopfrom
Open
Conversation
bb3d10c to
690d0a1
Compare
| router.get("/", validateGetQueryParams, getUserStatusControllers); | ||
| router.get("/self", authenticate, getUserStatus); | ||
| router.get("/:userId", getUserStatus); | ||
| router.patch("/sync", authorizeAndAuthenticate([ROLES.SUPERUSER], [Services.CRON_JOB_HANDLER]), syncUserStatus); |
Check failure
Code scanning / CodeQL
Missing rate limiting
e735491 to
beac0a5
Compare
10 tasks
e16e29d to
ef37641
Compare
skv93-coder
reviewed
Mar 31, 2024
Comment on lines
+245
to
+246
| await updateAllUserStatus(req, res, next); | ||
| const usersData = await getTaskBasedUsersStatus(req, res, next); |
Contributor
There was a problem hiding this comment.
can we use this two fx as middleware?
also, these functions seem to be returning res, which will result in an error, because in that case we are calling res/json 3 times.
Contributor
Author
There was a problem hiding this comment.
IMO logic that should be part of controllers should not be used as middleware
also, these functions seem to be returning res, which will result in an error, because in that case we are calling res/json 3 times.
Appologies did not understand
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Date: 23-03-2024
Developer Name: Pavan Bhat
Issue Ticket Number
RealDevSquad/cron-jobs#60
Description
Created a new route that can support nickname sync action
Documentation Updated?
Under Feature Flag
Database Changes
Breaking Changes
Development Tested?
Screenshots
Screenshot 1
Test Coverage
Screenshot 1
Additional Notes
Updated API contracts here: RealDevSquad/website-api-contracts#180