Files
Govor/docs/endpoints/friendsrequestquerycontroller.md
T
Artemy 632ac04b56 Add forwarding, friend controls, and benefits
Add message forwarding and reply lookup, friend removal and blocking endpoints, and database-backed Govor+ privileges with customizable profile tags. Include migrations, integration tests, and updated API and operations documentation.
2026-10-31 18:29:40 +07:00

25 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Списки заявок в друзья
Оба маршрута требуют Bearer token и возвращают 200 с FriendshipDto[].
| Метод | Маршрут | Назначение |
| --- | --- | --- |
| GET | /api/friends/requests | Входящие заявки |
| GET | /api/friends/responses | Исходящие записи, кроме Accepted (включая Pending, Rejected, Blocked) |
```json
[{
"id":"11111111-1111-1111-1111-111111111111",
"requesterId":"22222222-2222-2222-2222-222222222222",
"addresseeId":"33333333-3333-3333-3333-333333333333",
"status":0
}]
```
FriendshipStatus сериализуется числом: Pending=0, Accepted=1, Rejected=2, Blocked=3. id — идентификатор заявки/дружбы; именно он передаётся в AcceptRequest и RejectRequest.
При отсутствии записей — пустой массив. Ошибки контроллера — 500 с {"error":"Internal server error."}. Для восстановления после reconnect перечитайте списки: события не являются журналом гарантированной доставки.
Источник: [Govor.API/Controllers/Friends/FriendsRequestQueryController.cs](https://github.com/stalcker2288969/Govor/blob/a3401ceedf30c2eb6167f7ef6e4ae820883d2de2/Govor.API/Controllers/Friends/FriendsRequestQueryController.cs).