feat(moderation): add chat bans list endpoint with admin access checks
Some checks are pending
CI / test (push) Has started running

This commit is contained in:
2026-03-08 21:21:43 +03:00
parent 5909503012
commit 90320ffd5d
7 changed files with 114 additions and 1 deletions

View File

@@ -811,6 +811,22 @@ Auth required (`owner/admin` in group/channel).
Response: `204`
Behavior: bans user from chat and removes membership if present.
### GET `/api/v1/chats/{chat_id}/bans`
Auth required (`owner/admin` in group/channel).
Response: `200` + `ChatBanRead[]`
Example item:
```json
{
"chat_id": 42,
"user_id": 101,
"banned_by_user_id": 5,
"created_at": "2026-03-10T00:00:00Z"
}
```
### DELETE `/api/v1/chats/{chat_id}/bans/{user_id}`
Auth required (`owner/admin` in group/channel).