aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/admin_api/controllers
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-07-22 19:06:00 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-07-22 19:06:00 +0300
commit6f5f7af607518b6f67df68bab9bf76142e9a622c (patch)
tree42b8040061d9401865c28e6de4f8bb454bf0ba79 /lib/pleroma/web/admin_api/controllers
parent1c9752cff445ab1f58cea1617d3c7ab73da60e10 (diff)
downloadpleroma-6f5f7af607518b6f67df68bab9bf76142e9a622c.tar.gz
[#1973] Fixed accounts rendering in GET /api/v1/pleroma/chats with truish :restrict_unauthenticated.
Made `Pleroma.Web.MastodonAPI.AccountView.render("show.json", _)` demand :for or :force option in order to prevent incorrect rendering of empty map instead of expected user representation with truish :restrict_unauthenticated setting.
Diffstat (limited to 'lib/pleroma/web/admin_api/controllers')
-rw-r--r--lib/pleroma/web/admin_api/controllers/admin_api_controller.ex6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pleroma/web/admin_api/controllers/admin_api_controller.ex b/lib/pleroma/web/admin_api/controllers/admin_api_controller.ex
index e5f14269a..225ceb1fd 100644
--- a/lib/pleroma/web/admin_api/controllers/admin_api_controller.ex
+++ b/lib/pleroma/web/admin_api/controllers/admin_api_controller.ex
@@ -345,7 +345,11 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIController do
with {:ok, users, count} <- Search.user(Map.merge(search_params, filters)) do
json(
conn,
- AccountView.render("index.json", users: users, count: count, page_size: page_size)
+ AccountView.render("index.json",
+ users: users,
+ count: count,
+ page_size: page_size
+ )
)
end
end