Skip to content

Commit

Permalink
docs(readme): add remove group chat endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
borjom1 committed May 26, 2024
1 parent fb01edb commit 21da62f
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions backend/ws-server/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,51 @@ In other case you will receive message with `ERROR` action:

<br/>

### Remove chat

Message structure:

```
path=/chat/group/{chatId}/remove
```

Response message example:

```json
{
"action": "CHAT_DELETED",
"timestamp": 1716740907.419911700,
"senderId": 1,
"chatId": "663fc2da3c60a57263542aba"
}
```

Possible errors:

- Not a member

```json
{
"action": "ERROR",
"timestamp": 1716741112.036193800,
"error": "You are not member of chat",
"path": "/chat/group/663fc2da3c60a5726352aba/remove"
}
```

- Not an admin

```json
{
"action": "ERROR",
"timestamp": 1716741112.036193800,
"error": "Permissions denied",
"path": "/chat/group/66536423d774344eb33a552f/remove"
}
```

<br/>

<details>
<summary>Edit chat members</summary>

Expand Down

0 comments on commit 21da62f

Please sign in to comment.