X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fadmin_api%2Fviews%2Faccount_view.ex;h=619390ef4e51ce0518bf52882ea4363ab5adfac1;hb=d1c7f8e576e31487544b57d67802843b8ef38388;hp=eed1b9fa70c5cfc263b2763ebfaf06f3894a2f42;hpb=10ff01acd95d42314b4eb923e5b7a7191356b73e;p=akkoma
diff --git a/lib/pleroma/web/admin_api/views/account_view.ex b/lib/pleroma/web/admin_api/views/account_view.ex
index eed1b9fa7..619390ef4 100644
--- a/lib/pleroma/web/admin_api/views/account_view.ex
+++ b/lib/pleroma/web/admin_api/views/account_view.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.AdminAPI.AccountView do
@@ -18,6 +18,12 @@ defmodule Pleroma.Web.AdminAPI.AccountView do
}
end
+ def render("index.json", %{users: users}) do
+ %{
+ users: render_many(users, AccountView, "show.json", as: :user)
+ }
+ end
+
def render("show.json", %{user: user}) do
avatar = User.avatar_url(user) |> MediaProxy.url()
display_name = HTML.strip_tags(user.name || user.nickname)
@@ -30,7 +36,8 @@ defmodule Pleroma.Web.AdminAPI.AccountView do
"deactivated" => user.deactivated,
"local" => user.local,
"roles" => User.roles(user),
- "tags" => user.tags || []
+ "tags" => user.tags || [],
+ "confirmation_pending" => user.confirmation_pending
}
end