Add "roles" to users admin API
This commit is contained in:
parent
c231ed610a
commit
25eb6cf1cb
3 changed files with 30 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue