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
Copy file name to clipboardExpand all lines: users/README.md
+48-44Lines changed: 48 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@
26
26
'discordId': string,
27
27
'tokens': {},
28
28
'badges': []
29
+
'disabled_roles':[]
29
30
}
30
31
```
31
32
@@ -53,7 +54,7 @@ number and email address.
53
54
54
55
Returns all users in the system.
55
56
56
-
-**Params**
57
+
-**Params**
57
58
None
58
59
-**Query**
59
60
- Optional: `size=[integer]` (`size` is the number of users requested per page, value ranges between 1-100, and the default value is 100)
@@ -62,11 +63,11 @@ Returns all users in the system.
62
63
- Optional: `next=[string]` (`next` is the id of the DB document to get the next batch/page of results after that document.)
63
64
- Optional: `prev=[string]` (`prev` is the id of the DB document to get the previous batch/page of results before that document.)
64
65
- Optional: `query=[string]` (`query` can be used to filter and/or sort users based on their PR and Issue status within a given date range. [Learn more](https://github.com/Real-Dev-Squad/website-backend/wiki/Filter-and-sort-users-based-on-PRs-and-Issues) )
65
-
-**Body**
66
+
-**Body**
66
67
None
67
-
-**Headers**
68
+
-**Headers**
68
69
Content-Type: application/json
69
-
-**Cookie**
70
+
-**Cookie**
70
71
rds-session: `<JWT>`
71
72
-**Success Response:**
72
73
-**Code:** 200
@@ -94,14 +95,14 @@ Returns all users in the system.
94
95
95
96
Returns the details of logged in user.
96
97
97
-
- **Params**
98
+
- **Params**
98
99
None
99
100
- **Query** private=[boolean] private=[boolean]
100
-
- **Body**
101
+
- **Body**
101
102
None
102
-
- **Headers**
103
+
- **Headers**
103
104
Content-Type: application/json
104
-
- **Cookie**
105
+
- **Cookie**
105
106
rds-session: `<JWT>`
106
107
- **Success Response:**
107
108
- **Code:** 200
@@ -124,13 +125,13 @@ Returns the details of logged in user.
124
125
125
126
Returns the specified user.
126
127
127
-
- **Params**
128
+
- **Params**
128
129
_Required:_ `userId=[string]`
129
-
- **Body**
130
+
- **Body**
130
131
None
131
-
- **Headers**
132
+
- **Headers**
132
133
Content-Type: application/json
133
-
- **Cookie**
134
+
- **Cookie**
134
135
None
135
136
- **Success Response:**
136
137
- **Code:** 200
@@ -150,13 +151,13 @@ Returns the specified user.
150
151
151
152
Returns the specified user.
152
153
153
-
- **Params**
154
+
- **Params**
154
155
_Required:_ `username=[string]`
155
-
- **Body**
156
+
- **Body**
156
157
None
157
-
- **Headers**
158
+
- **Headers**
158
159
Content-Type: application/json
159
-
- **Cookie**
160
+
- **Cookie**
160
161
None
161
162
- **Success Response:**
162
163
- **Code:** 200
@@ -173,13 +174,13 @@ Returns the specified user.
173
174
174
175
Returns the availability of username.
175
176
176
-
- **Params**
177
+
- **Params**
177
178
_Required:_ `username=[string]`
178
-
- **Body**
179
+
- **Body**
179
180
None
180
-
- **Headers**
181
+
- **Headers**
181
182
Content-Type: application/json
182
-
- **Cookie**
183
+
- **Cookie**
183
184
rds-session: `<JWT>`
184
185
- **Success Response:**
185
186
- **Code:** 200
@@ -196,15 +197,15 @@ Returns the availability of username.
196
197
197
198
Returns badges assigned to the user
198
199
199
-
- **Params**
200
+
- **Params**
200
201
Required: `id=[string]`
201
-
- **Query**
202
+
- **Query**
202
203
None
203
-
- **Body**
204
+
- **Body**
204
205
None
205
-
- **Headers**
206
+
- **Headers**
206
207
Content-Type: application/json
207
-
- **Cookie**
208
+
- **Cookie**
208
209
None
209
210
- **Success Response:**
210
211
- **Code:** 200
@@ -219,7 +220,7 @@ Returns badges assigned to the user
219
220
220
221
Returns users based on the specified filters.
221
222
222
-
- **Params:**
223
+
- **Params:**
223
224
None
224
225
225
226
- **Query Parameters:**
@@ -232,10 +233,10 @@ Returns users based on the specified filters.
232
233
- Optional: `verified=[string]` (Specifies if the user is verified. Possible values: "true", "false")
233
234
- Optional: `time=[string]` (Specifies the time filter, e.g., "31d")
234
235
235
-
- **Body:**
236
+
- **Body:**
236
237
None
237
238
238
-
- **Headers:**
239
+
- **Headers:**
239
240
Content-Type: application/json
240
241
rds-session: `<JWT>`
241
242
@@ -274,13 +275,13 @@ Returns users based on the specified filters.
274
275
275
276
Creates a new User.
276
277
277
-
- **Params**
278
+
- **Params**
278
279
None
279
-
- **Query**
280
+
- **Query**
280
281
None
281
-
- **Headers**
282
+
- **Headers**
282
283
Content-Type: application/json
283
-
- **Cookie**
284
+
- **Cookie**
284
285
rds-session: `<JWT>`
285
286
- **Body** `{ <user_object> }`
286
287
- **Success Response:**
@@ -296,20 +297,22 @@ Creates a new User.
296
297
297
298
## **PATCH /users/self**
298
299
299
-
Updates data of the User.
300
+
Updates data of the User. Doesn't update if user is `(in_discord && !userDetailsIncomplete)`, Except for `disabled_roles` property.
`{ 'statusCode': 403, 'error': 'Forbidden', 'message': 'Developers can only update disabled_roles. Use profile service for updating other attributes.'}`
0 commit comments