File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 66
66
| [ GET /tasks/: id /details] ( #get-tasksiddetails ) | Get details of a particular task |
67
67
| [ GET /tasks/: username ] ( #get-tasksusername ) | Returns all tasks of the user |
68
68
| [ PATCH /tasks/self/: id ] ( #patch-tasksselfid ) | Changes in own task |
69
+ | [ PATCH /tasks/assign/: userId ] ( ) | Assigns the task based on task availability and skill |
69
70
70
71
## ** GET /tasks**
71
72
@@ -313,3 +314,31 @@ Returns all tasks of the requested user.
313
314
- ** Content:** ` { 'statusCode': 404, 'error': 'Not Found', 'message': 'Task doesn't exist' } `
314
315
- ** Code:** 500
315
316
- ** Content:** ` { 'statusCode': 500, 'error': 'Internal Server Error', 'message': 'An internal server error occurred' } `
317
+
318
+
319
+ ## ** PATCH /tasks/assign/: userId **
320
+
321
+ - ** Params**
322
+ _ Required:_ ` userId = <userId> `
323
+
324
+ - ** Headers**
325
+ Content-Type: application/json
326
+
327
+ - ** Body**
328
+
329
+ - ** Cookie**
330
+ rds-session: ` <JWT> `
331
+
332
+ - ** Success Response:**
333
+ - ** Code** : 200
334
+
335
+ ```
336
+ {
337
+ message: 'Task assigned',
338
+ id: <string>
339
+ }
340
+ ```
341
+
342
+ - ** Error Response:**
343
+ - ** Code:** 500
344
+ - ** Content:** ` { 'statusCode': 500, 'error': 'Internal Server Error', 'message': 'An internal server error occurred' } `
You can’t perform that action at this time.
0 commit comments