-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
verifyContestModerator
middleware
#82
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I'll wait for @NBNARADHYA before merging 😆 |
Co-authored-by: NIKHIL BN <[email protected]>
Co-authored-by: NIKHIL BN <[email protected]>
Co-authored-by: NIKHIL BN <[email protected]>
Co-authored-by: NIKHIL BN <[email protected]>
Co-authored-by: NIKHIL BN <[email protected]>
Co-authored-by: NIKHIL BN <[email protected]>
Co-authored-by: NIKHIL BN <[email protected]>
Co-authored-by: NIKHIL BN <[email protected]>
Co-authored-by: NIKHIL BN <[email protected]>
Co-authored-by: NIKHIL BN <[email protected]>
Co-authored-by: NIKHIL BN <[email protected]>
Co-authored-by: NIKHIL BN <[email protected]>
Co-authored-by: NIKHIL BN <[email protected]>
a816cd1
to
805d837
Compare
d9626c5
to
fe3f1a5
Compare
Co-authored-by: NIKHIL BN <[email protected]>
fe3f1a5
to
690cb85
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly, 2 changes are required:
- Release the pool connection in transaction, when any error occurs
- When the user who is sending the request doesn't have moderator access, appropriate error needs to be returned
Co-authored-by: Chirag Jain <[email protected]>
Co-authored-by: Chirag Jain <[email protected]>
Co-authored-by: Chirag Jain <[email protected]>
Co-authored-by: Chirag Jain <[email protected]>
Co-authored-by: Chirag Jain <[email protected]>
5bba395
to
5fcce60
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks clean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Issue at work: #60
resolves: #81
APIs covered:
createContest
POST /contests/
Admin only: create a contestupdateContest
POST /contests/:contest_id/update
Moderator only: update contestaddModerator
POST /contests/:contest_id/moderator
Moderator only: Add moderatorremoveModerator
DELETE /contests/:contest_id/moderator
Moderator only: remove moderator (creator can't be deleted)addGroup
POST /contests/:contest_id/:groups
Moderator only: Add groupremoveGroup
DELETE /contests/:contest_id/groups
Moderator only: remove group