diff options
author | Maxim Filippov <colixer@gmail.com> | 2019-03-12 22:15:28 +0300 |
---|---|---|
committer | Maxim Filippov <colixer@gmail.com> | 2019-03-12 22:15:28 +0300 |
commit | 25eb6cf1cbbfe78618f13a7218238a69807a051c (patch) | |
tree | 4acbcb48fb4aebb016129d2d72d9f3e7b7ec1747 /lib/pleroma/web | |
parent | c231ed610a8ebf95d9fb0a4bfa9e557ebf050a92 (diff) | |
download | pleroma-25eb6cf1cbbfe78618f13a7218238a69807a051c.tar.gz |
Add "roles" to users admin API
Diffstat (limited to 'lib/pleroma/web')
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/admin/account_view.ex | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/admin/account_view.ex b/lib/pleroma/web/mastodon_api/views/admin/account_view.ex index 74ca13564..66ad20ec4 100644 --- a/lib/pleroma/web/mastodon_api/views/admin/account_view.ex +++ b/lib/pleroma/web/mastodon_api/views/admin/account_view.ex @@ -6,6 +6,7 @@ defmodule Pleroma.Web.MastodonAPI.Admin.AccountView do use Pleroma.Web, :view alias Pleroma.Web.MastodonAPI.Admin.AccountView + alias Pleroma.User.Info def render("index.json", %{users: users, count: count, page_size: page_size}) do %{ @@ -19,7 +20,8 @@ defmodule Pleroma.Web.MastodonAPI.Admin.AccountView do %{ "id" => user.id, "nickname" => user.nickname, - "deactivated" => user.info.deactivated + "deactivated" => user.info.deactivated, + "roles" => Info.roles(user.info) } end end |