-
Notifications
You must be signed in to change notification settings - Fork 263
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
feat: add purpose field and make discord invite API be able to generate invites n times by superusers #2218
base: develop
Are you sure you want to change the base?
feat: add purpose field and make discord invite API be able to generate invites n times by superusers #2218
Conversation
Please add proper test coverage of the file you changed |
router.post("/invite", authenticate, checkCanGenerateDiscordLink, generateInviteForUser); | ||
router.post( | ||
"/invite", | ||
authenticate, |
Check failure
Code scanning / CodeQL
Missing rate limiting High
authorization
This route handler performs
authorization
This route handler performs
authorization
Done |
How are you passing the user ID in the query params? |
@vinit717 I am not sure if I get your question properly, but the id is getting passed in this way |
How does this API get the userID from frontend? |
We need to pass the userId in the query params and we can read it in the code in this way |
How are you passing the userId? how did you know the userId and which userId to pass? |
I guess now I got your exact question, so for now we are not passing the userId from frontend. Right now the userId is getting used from superUser token. |
Date: 19/10/2024
Developer Name: Kuldeep Gupta
Issue Ticket Number
This is a subtask for this issue Real-Dev-Squad/website-dashboard#867
Description
I have refactored the discord invite API to add a purpose field along with a feature flag and also, the superuser can create n times discord invites.
Design Doc Link: https://docs.google.com/document/d/1kGOpNMBlRLJ7gARYv1kCOUaE3b96G5Y212IN05igJkc/edit?tab=t.0#heading=h.f040sbx0way2
Documentation Updated?
Under Feature Flag
Database Changes
Breaking Changes
Development Tested?
Screenshots
Screenshot 1
Without a feature flagWith a feature flag (When user doesn't have invite link already created.)
With a feature flag (When the user already has an invite link.)
Test Coverage
Unit Tests Screenshots
Integration Tests Screenshots
Additional Notes