Skip to content

Commit 1432324

Browse files
authored
updated doc to include task assignment (#213)
1 parent c381313 commit 1432324

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

tasks/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
| [GET /tasks/:id/details](#get-tasksiddetails) | Get details of a particular task |
6767
| [GET /tasks/:username](#get-tasksusername) | Returns all tasks of the user |
6868
| [PATCH /tasks/self/:id](#patch-tasksselfid) | Changes in own task |
69+
| [PATCH /tasks/assign/:userId]() | Assigns the task based on task availability and skill |
6970

7071
## **GET /tasks**
7172

@@ -313,3 +314,31 @@ Returns all tasks of the requested user.
313314
- **Content:** `{ 'statusCode': 404, 'error': 'Not Found', 'message': 'Task doesn't exist' }`
314315
- **Code:** 500
315316
- **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' }`

0 commit comments

Comments
 (0)