Add more admin actions
This commit is contained in:
parent
b985c91431
commit
90d0d055fc
4 changed files with 39 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ defmodule Pleroma.Web.TwitterAPI.UserView do
|
|||
alias Pleroma.User
|
||||
alias Pleroma.Web.CommonAPI.Utils
|
||||
alias Pleroma.Web.MediaProxy
|
||||
alias Pleroma.Web.TwitterAPI.UserView
|
||||
|
||||
def render("show.json", %{user: user = %User{}} = assigns) do
|
||||
render_one(user, Pleroma.Web.TwitterAPI.UserView, "user.json", assigns)
|
||||
|
|
@ -26,6 +27,19 @@ defmodule Pleroma.Web.TwitterAPI.UserView do
|
|||
else: %{}
|
||||
end
|
||||
|
||||
def render("index_for_admin.json", %{users: users} = opts) do
|
||||
users
|
||||
|> render_many(UserView, "show_for_admin.json", opts)
|
||||
end
|
||||
|
||||
def render("show_for_admin.json", %{user: user}) do
|
||||
%{
|
||||
"id" => user.id,
|
||||
"nickname" => user.nickname,
|
||||
"deactivated" => user.info.deactivated
|
||||
}
|
||||
end
|
||||
|
||||
def render("short.json", %{
|
||||
user: %User{
|
||||
nickname: nickname,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue