File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change 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
69
| [ PATCH /tasks/assign/: userId ] ( ) | Assigns the task based on task availability and skill |
70
+ | [ PATCH /tasks/: id /status] ( ) | Changes the status in own task |
70
71
71
72
## ** GET /tasks**
72
73
@@ -342,3 +343,52 @@ Returns all tasks of the requested user.
342
343
- ** Error Response:**
343
344
- ** Code:** 500
344
345
- ** Content:** ` { 'statusCode': 500, 'error': 'Internal Server Error', 'message': 'An internal server error occurred' } `
346
+
347
+
348
+ ## ** PATCH /tasks/: id /status**
349
+
350
+ - ** Params**
351
+ _ Required:_ ` id=[string] `
352
+
353
+ - ** Headers**
354
+ Content-Type: application/json
355
+
356
+ - ** Body**
357
+
358
+ ```
359
+ {
360
+ status: <new-status>
361
+ percentCompleted: <number>
362
+ }
363
+ ```
364
+
365
+ - ** Cookie**
366
+ rds-session: ` <JWT> `
367
+
368
+ - ** Success Response:**
369
+ - ** Code** : 200
370
+
371
+ ```
372
+ {
373
+ message: 'Task updated successfully!'
374
+ userStatus?: {
375
+ status : "String",
376
+ message : "String"
377
+ data: {
378
+ "previousStatus"?: "String",
379
+ "currentStatus"?: "String",
380
+ "futureStatus"?: "String"
381
+ }
382
+ }
383
+ }
384
+ ```
385
+
386
+ - ** Error Response:**
387
+ - ** Code:** 401
388
+ - ** Content:** ` { 'statusCode': 401, 'error': 'Unauthorized', 'message': 'Unauthenticated User' } `
389
+ - ** Code:** 403
390
+ - ** Content:** ` { 'statusCode': 403, 'error': 'Forbidden', 'message':'This task is not assigned to you' } `
391
+ - ** Code:** 404
392
+ - ** Content:** ` { 'statusCode': 404, 'error': 'Not Found', 'message': 'Task doesn't exist' } `
393
+ - ** Code:** 500
394
+ - ** 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