mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 03:17:51 +00:00
Merge branch 'cleanup/admin-api-useless-if' into 'develop'
Web.AdminAPI.AdminAPIController: Remove a useless if in user_delete See merge request pleroma/pleroma!612
This commit is contained in:
commit
32541172cd
1 changed files with 2 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue