feat(moderation): add chat bans list endpoint with admin access checks
Some checks are pending
CI / test (push) Has started running
Some checks are pending
CI / test (push) Has started running
This commit is contained in:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user