optimize follow_request_count for own account view
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
parent
c07506ab6e
commit
5068e31583
1 changed files with 2 additions and 2 deletions
|
|
@ -361,8 +361,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
|
|||
) do
|
||||
count =
|
||||
user
|
||||
|> User.get_follow_requests()
|
||||
|> length()
|
||||
|> User.get_follow_requests_query()
|
||||
|> Pleroma.Repo.aggregate(:count)
|
||||
|
||||
data
|
||||
|> Kernel.put_in([:follow_requests_count], count)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue