mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-26 16:02:18 +00:00
Web.AdminAPI.AdminAPIController: Remove a useless if in user_delete
This commit is contained in:
parent
33e3a7ba7d
commit
1e6c102bfc
|
@ -14,13 +14,8 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIController do
|
||||||
action_fallback(:errors)
|
action_fallback(:errors)
|
||||||
|
|
||||||
def user_delete(conn, %{"nickname" => nickname}) do
|
def user_delete(conn, %{"nickname" => nickname}) do
|
||||||
user = User.get_by_nickname(nickname)
|
User.get_by_nickname(nickname)
|
||||||
|
|> User.delete()
|
||||||
if user.local == true do
|
|
||||||
User.delete(user)
|
|
||||||
else
|
|
||||||
User.delete(user)
|
|
||||||
end
|
|
||||||
|
|
||||||
conn
|
conn
|
||||||
|> json(nickname)
|
|> json(nickname)
|
||||||
|
|
Loading…
Reference in a new issue