Admin API: Allow querying user by ID

This commit is contained in:
Maxim Filippov 2019-07-05 19:33:53 +03:00
commit 6c50fbcd14
3 changed files with 13 additions and 1 deletions

View file

@ -74,7 +74,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIController do
end
def user_show(conn, %{"nickname" => nickname}) do
with %User{} = user <- User.get_cached_by_nickname(nickname) do
with %User{} = user <- User.get_cached_by_nickname_or_id(nickname) do
conn
|> json(AccountView.render("show.json", %{user: user}))
else