aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/pagination.ex5
-rw-r--r--lib/pleroma/web/admin_api/views/report_view.ex5
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/pleroma/pagination.ex b/lib/pleroma/pagination.ex
index 9d279fba7..183ef770e 100644
--- a/lib/pleroma/pagination.ex
+++ b/lib/pleroma/pagination.ex
@@ -35,7 +35,10 @@ defmodule Pleroma.Pagination do
end
def fetch_paginated(query, %{"total" => true} = params, :offset) do
- total = Repo.aggregate(query, :count, :id)
+ total =
+ query
+ |> Ecto.Query.exclude(:left_join)
+ |> Repo.aggregate(:count, :id)
%{
total: total,
diff --git a/lib/pleroma/web/admin_api/views/report_view.ex b/lib/pleroma/web/admin_api/views/report_view.ex
index 80ca62691..f5c6ba401 100644
--- a/lib/pleroma/web/admin_api/views/report_view.ex
+++ b/lib/pleroma/web/admin_api/views/report_view.ex
@@ -69,12 +69,13 @@ defmodule Pleroma.Web.AdminAPI.ReportView do
def render("index_notes.json", _), do: []
- def render("show_note.json", %{content: content, user_id: user_id}) do
+ def render("show_note.json", %{content: content, user_id: user_id, inserted_at: inserted_at}) do
user = User.get_by_id(user_id)
%{
content: content,
- user: merge_account_views(user)
+ user: merge_account_views(user),
+ created_at: inserted_at
}
end