def delete_account(%{assigns: %{user: user}} = conn, params) do
case CommonAPI.Utils.confirm_current_password(user, params["password"]) do
{:ok, user} ->
- Task.start(fn -> User.delete(user) end)
+ User.delete(user)
json(conn, %{status: "success"})
{:error, msg} ->
end
def healthcheck(conn, _params) do
- info = Pleroma.Healthcheck.system_info()
+ info =
+ if Pleroma.Config.get([:instance, :healthcheck]) do
+ Pleroma.Healthcheck.system_info()
+ else
+ %{}
+ end
conn =
- if info.healthy do
+ if info[:healthy] do
conn
else
Plug.Conn.put_status(conn, :service_unavailable)