Admin API: Render whole status in grouped reports
This commit is contained in:
parent
937d6c6b32
commit
2b341627da
4 changed files with 31 additions and 17 deletions
|
|
@ -45,10 +45,16 @@ defmodule Pleroma.Web.AdminAPI.ReportView do
|
|||
def render("index_grouped.json", %{groups: groups}) do
|
||||
reports =
|
||||
Enum.map(groups, fn group ->
|
||||
status =
|
||||
if group[:status_deleted],
|
||||
do: group[:status],
|
||||
else: StatusView.render("show.json", %{activity: group[:status]})
|
||||
|
||||
%{
|
||||
date: group[:date],
|
||||
account: group[:account],
|
||||
status: group[:status],
|
||||
status: status,
|
||||
status_deleted: status_deleted,
|
||||
actors: Enum.map(group[:actors], &merge_account_views/1),
|
||||
reports:
|
||||
group[:reports]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue