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

This commit is contained in:
Haelwenn (lanodan) Monnier 2018-12-31 12:18:59 +01:00
parent 33e3a7ba7d
commit 1e6c102bfc
No known key found for this signature in database
GPG Key ID: D5B7A8E43C997DEE
1 changed files with 2 additions and 7 deletions

View File

@ -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)