You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[GET /discord/invites](#get-discord-invites)| return all the invites generated |
19
-
[POST /discord/invites](#post-discord-invites) | generates a invite for a user |
18
+
|[GET /discord/invites](#get-discord-actions-invites)| return all the invites generated |
19
+
[POST /discord/invites](#post-discord-actions -invites) | generates a invite for a user |
20
20
---
21
21
22
-
## **GET /discord/invites**
22
+
## **GET /discord-actions/invite**
23
23
24
-
- This API can only be accessed by super user and if the query param contains userId and the userId matches the userId of the user then it return the invite generated by that user
25
-
26
-
returns all the invites if there is no query param sent in the url, if there is a query param userId it return invite generated for a particulat user
24
+
- return the discord invite created for the user
27
25
28
26
-**Query**
29
27
30
-
- Optional: `userId=[string]`: if this is provided it returns the invite for a pariticular user if the userId of the user matches the userId in query param, or the user is super user, other it return 403
28
+
- Optional: `userId=[string]`: if this is provided it returns the invite of the user whose userId is provided in the query param, if the user is not a super user then this should be equal to the userId of the user, if no userId is provided, it return invite for the user who has made the request
31
29
32
30
-**Headers**
33
31
None
@@ -40,8 +38,8 @@ returns all the invites if there is no query param sent in the url, if there is
40
38
-**Content:**
41
39
```json
42
40
{
43
-
"message": "invite returned successfully"|| "invites returned successfully",
@@ -68,7 +66,7 @@ returns all the invites if there is no query param sent in the url, if there is
68
66
- **Content:**
69
67
```json
70
68
{
71
-
"message": "User not found."
69
+
"message": "Invite not found for user!"
72
70
}
73
71
```
74
72
- **Code:** 500
@@ -88,9 +86,9 @@ returns all the invites if there is no query param sent in the url, if there is
88
86
- **Params**\
89
87
None
90
88
- **Query**\
91
-
None
89
+
- Optional: `userId=[string]`: if this is provided it create the invite for that userId if the user is a super user, if this is not provided it create invite for the user making the request
92
90
- **Body**\
93
-
`{ userId: <string> }`
91
+
None
94
92
- **Headers**\
95
93
None
96
94
- **Cookie**\
@@ -100,7 +98,8 @@ returns all the invites if there is no query param sent in the url, if there is
100
98
- **Content:**
101
99
```json
102
100
{
103
-
"message": "Invite created successfully."
101
+
"message": "Invite created successfully.",
102
+
"inviteLink": "string",
104
103
}
105
104
```
106
105
- **Code:** 401
@@ -112,18 +111,11 @@ returns all the invites if there is no query param sent in the url, if there is
0 commit comments