AdminAPI: return user email
authorAlex Gleason <alex@alexgleason.me>
Wed, 6 Jan 2021 17:30:32 +0000 (11:30 -0600)
committerAlex Gleason <alex@alexgleason.me>
Wed, 6 Jan 2021 17:30:32 +0000 (11:30 -0600)
lib/pleroma/web/admin_api/views/account_view.ex
test/pleroma/web/admin_api/controllers/user_controller_test.exs

index 8bac24d3efabdb991e61999147c6eb5b57395abc..ebf90b91b3c68ec6171e0e17d0d95aef9330b516 100644 (file)
@@ -69,6 +69,7 @@ defmodule Pleroma.Web.AdminAPI.AccountView do
 
     %{
       "id" => user.id,
+      "email" => user.email,
       "avatar" => avatar,
       "nickname" => user.nickname,
       "display_name" => display_name,
index 5705306c74a1fa92e58a16d1316bea2b8c90ecdf..67b0c578c426b78068628ec4ff70ba9f040f46a1 100644 (file)
@@ -953,6 +953,7 @@ defmodule Pleroma.Web.AdminAPI.UserControllerTest do
     %{
       "deactivated" => user.deactivated,
       "id" => user.id,
+      "email" => user.email,
       "nickname" => user.nickname,
       "roles" => %{"admin" => false, "moderator" => false},
       "local" => user.local,