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
|
) do
|
||||||
count =
|
count =
|
||||||
user
|
user
|
||||||
|> User.get_follow_requests()
|
|> User.get_follow_requests_query()
|
||||||
|> length()
|
|> Pleroma.Repo.aggregate(:count)
|
||||||
|
|
||||||
data
|
data
|
||||||
|> Kernel.put_in([:follow_requests_count], count)
|
|> Kernel.put_in([:follow_requests_count], count)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue