Commit 32541172 authored by lain's avatar lain
Browse files

Merge branch 'cleanup/admin-api-useless-if' into 'develop'

Web.AdminAPI.AdminAPIController: Remove a useless if in user_delete

See merge request !612
parents 90e157ef 1e6c102b
Pipeline #5913 passed with stages
in 5 minutes and 38 seconds
......@@ -14,13 +14,8 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIController do
action_fallback(:errors)
def user_delete(conn, %{"nickname" => nickname}) do
user = User.get_by_nickname(nickname)
if user.local == true do
User.delete(user)
else
User.delete(user)
end
User.get_by_nickname(nickname)
|> User.delete()
conn
|> json(nickname)
......
Supports Markdown
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