Commit 047a11c4 authored by Alexander Strizhakov's avatar Alexander Strizhakov

Apply suggestion to lib/pleroma/web/admin_api/controllers/admin_api_controller.ex

parent 32491415
......@@ -715,11 +715,7 @@ def update_user_credentials(
json(conn, %{status: "success"})
{:error, changeset} ->
errors =
Enum.reduce(changeset.errors, %{}, fn
{key, {error, _}}, acc ->
Map.put(acc, key, error)
errors =, fn {key, {error, _}} -> {key, error} end)
json(conn, %{errors: errors})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment