[#518] Fixed /api/v1/instance ("domain_count" value) and /api/v1/instance/peers responses.
This commit is contained in:
parent
de1da7b3d1
commit
90433b988e
2 changed files with 24 additions and 7 deletions
|
|
@ -34,10 +34,11 @@ defmodule Pleroma.Stats do
|
|||
peers =
|
||||
from(
|
||||
u in Pleroma.User,
|
||||
select: fragment("distinct ?->'host'", u.info),
|
||||
select: fragment("distinct split_part(?, '@', 2)", u.nickname),
|
||||
where: u.local != ^true
|
||||
)
|
||||
|> Repo.all()
|
||||
|> Enum.filter(& &1)
|
||||
|
||||
domain_count = Enum.count(peers)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue