Remove follow_request_count as it's not needed for FE anymore.
MastoFE uses `GET /api/v1/follow_requests` and PleromaFE uses `GET /api/pleroma/friend_requests` which they query on the initial page load.
This commit is contained in:
parent
9b63fda9c7
commit
d5418e9ff7
6 changed files with 4 additions and 53 deletions
|
|
@ -133,7 +133,6 @@ defmodule Pleroma.Web.TwitterAPI.UserView do
|
|||
"tags" => user.tags
|
||||
}
|
||||
|> maybe_with_activation_status(user, for_user)
|
||||
|> maybe_with_follow_request_count(user, for_user)
|
||||
}
|
||||
|
||||
data =
|
||||
|
|
@ -155,14 +154,6 @@ defmodule Pleroma.Web.TwitterAPI.UserView do
|
|||
|
||||
defp maybe_with_activation_status(data, _, _), do: data
|
||||
|
||||
defp maybe_with_follow_request_count(data, %User{id: id, info: %{locked: true}} = user, %User{
|
||||
id: id
|
||||
}) do
|
||||
Map.put(data, "follow_request_count", user.info.follow_request_count)
|
||||
end
|
||||
|
||||
defp maybe_with_follow_request_count(data, _, _), do: data
|
||||
|
||||
defp maybe_with_role(data, %User{id: id} = user, %User{id: id}) do
|
||||
Map.merge(data, %{"role" => role(user), "show_role" => user.info.show_role})
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue