Add changelog entry
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
parent
5068e31583
commit
520bac27dc
3 changed files with 4 additions and 3 deletions
1
changelog.d/paginate-follow-requests.change
Normal file
1
changelog.d/paginate-follow-requests.change
Normal file
|
|
@ -0,0 +1 @@
|
|||
Paginate follow requests
|
||||
|
|
@ -17,7 +17,7 @@ defmodule Pleroma.Web.ApiSpec.PleromaFollowRequestOperation do
|
|||
tags: ["Follow requests"],
|
||||
summary: "Retrieve outgoing follow requests",
|
||||
security: [%{"oAuth" => ["read:follows", "follow"]}],
|
||||
operationId: "PleromaFollowRequestController.outgoing",,
|
||||
operationId: "PleromaFollowRequestController.outgoing",
|
||||
parameters: pagination_params(),
|
||||
responses: %{
|
||||
200 =>
|
||||
|
|
|
|||
|
|
@ -21,11 +21,11 @@ defmodule Pleroma.Web.PleromaAPI.FollowRequestController do
|
|||
defdelegate open_api_operation(action), to: Pleroma.Web.ApiSpec.PleromaFollowRequestOperation
|
||||
|
||||
@doc "GET /api/v1/pleroma/outgoing_follow_requests"
|
||||
def outgoing(%{assigns: %{user: follower}} = conn, _params) do
|
||||
def outgoing(%{assigns: %{user: follower}} = conn, params) do
|
||||
follow_requests =
|
||||
follower
|
||||
|> User.get_outgoing_follow_requests_query()
|
||||
|> Pagination.fetch_paginated(params, :keyset, :follower)
|
||||
|> Pagination.fetch_paginated(params, :keyset, :following)
|
||||
|
||||
conn
|
||||
|> put_view(Pleroma.Web.MastodonAPI.FollowRequestView)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue