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 |
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 RealDevSquad/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