|
17 | 17 | | POST | [/api/auth/login](#2-login-user) | Log in and receive a token pair | |
18 | 18 | | POST | [/api/auth/refresh](#3-refresh) | Exchange a refresh token for a new token pair | |
19 | 19 | | GET | [/api/users/me](#1-user-me) | Get the authenticated user's profile | |
20 | | -| GET | [/api/users/:id](#2-search-user-by-id) | Search users by username or display name | |
21 | | -| GET | [/api/users/search?q=&page=&limit=](#3-search-user-by-username-and-display-name) | Get a public user profile | |
| 20 | +| GET | [/api/users/:id](#2-search-user-by-id) | Search users by User id | |
| 21 | +| GET | [/api/users/search?q=&page=&limit=](#3-search-user-by-username-and-display-name) | Search user by username and display name | |
22 | 22 | | GET | [/ws](#1-connect-to-websocket) | WebSocket upgrade endpoint (JWT required) | |
23 | 23 | | WS | [Client to Server](#2-client-to-server-messages) | Client to Server Websocket | |
24 | 24 | | WS | [Server to Client](#3-server-to-client-messages) | Server to Client Websocket | |
@@ -697,10 +697,10 @@ Conversations is successfully retrieved. |
697 | 697 | "name": "<username>", |
698 | 698 | "display_name": "<display Name>", |
699 | 699 | "last_message": "<content>", |
700 | | - "last_message_time": "<last message time>", |
| 700 | + "last_message_time": "<Timestamp", |
701 | 701 | "sender_id": "<user_id>", |
702 | | - "is_read": (bool)"<read of coresponding user>", |
703 | | - "unread_count": (int)0"<unread_count of corresponding user>" |
| 702 | + "is_read": false/true"<read_status>", |
| 703 | + "unread_count": 0"<unread_count of corresponding user>" |
704 | 704 | } |
705 | 705 | ] |
706 | 706 | } |
@@ -782,7 +782,7 @@ Returned when group is successfully created |
782 | 782 | ``` |
783 | 783 |
|
784 | 784 | ##### `401 Unauthorized` |
785 | | -Returned when access token is expried or incorrect. |
| 785 | +Returned when access token is expired or incorrect. |
786 | 786 | ```json |
787 | 787 | { |
788 | 788 | "success": false, |
@@ -983,7 +983,7 @@ Returned when access token is expired or incorrect |
983 | 983 |
|
984 | 984 | ### 6. Leave Group |
985 | 985 |
|
986 | | -- **URL:** `/api/messages/groups/{id}/leave` |
| 986 | +- **URL:** `/api/groups/{id}/leave` |
987 | 987 | - **Method:** `POST` |
988 | 988 | - **Headers:** `Content-Type: application/json` |
989 | 989 | - **Authentication Required:** `YES` |
@@ -1020,14 +1020,14 @@ Returned when access token is expired or incorrect |
1020 | 1020 |
|
1021 | 1021 | ### 7. Update Group Details |
1022 | 1022 |
|
1023 | | -- **URL:** `/api/messages/groups/{id}/` |
| 1023 | +- **URL:** `/api/groups/{id}/` |
1024 | 1024 | - **Method:** `PATCH` |
1025 | 1025 | - **Headers:** `Content-Type: application/json` |
1026 | 1026 | - **Authentication Required:** `YES` |
1027 | 1027 | - **Admin Access Required:** `YES` |
1028 | 1028 | - **curl:** `curl -X PATCH "http://HOST:PORT/api/groups/{id}/" -H "Authorization: Bearer <access_token>" -d '{ "name":"<group_name>" }'` |
1029 | 1029 |
|
1030 | | -#### Response Body |
| 1030 | +#### Request Body |
1031 | 1031 | ```json |
1032 | 1032 | { |
1033 | 1033 | "name":"<new_group_name>" |
@@ -1070,7 +1070,7 @@ Returned when access token is expired or incorrect |
1070 | 1070 | ``` |
1071 | 1071 |
|
1072 | 1072 | ### 8. Add Member to group |
1073 | | -- **URL:** `/api/messages/groups/{id}/members` |
| 1073 | +- **URL:** `/api/groups/{id}/members` |
1074 | 1074 | - **Method:** `POST` |
1075 | 1075 | - **Headers:** `Content-Type: application/json` |
1076 | 1076 | - **Authentication Required:** `YES` |
@@ -1129,7 +1129,7 @@ Returned when access token is expired or incorrect |
1129 | 1129 | ``` |
1130 | 1130 |
|
1131 | 1131 | ### 9. Remove User from Group |
1132 | | -- **URL:** `/api/messages/groups/{id}/members/{user_id}` |
| 1132 | +- **URL:** `/api/groups/{id}/members/{user_id}` |
1133 | 1133 | - **Method:** `DELETE` |
1134 | 1134 | - **Headers:** `Content-Type: application/json` |
1135 | 1135 | - **Authentication Required:** `YES` |
|
0 commit comments