optimize follow_request_count for own account view
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
parent
0ec0ad8559
commit
7b134e7aa5
1 changed files with 2 additions and 2 deletions
|
|
@ -357,8 +357,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