From: Haelwenn (lanodan) Monnier Date: Mon, 31 Dec 2018 11:18:59 +0000 (+0100) Subject: Web.AdminAPI.AdminAPIController: Remove a useless if in user_delete X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=1e6c102b;p=akkoma Web.AdminAPI.AdminAPIController: Remove a useless if in user_delete --- diff --git a/lib/pleroma/web/admin_api/admin_api_controller.ex b/lib/pleroma/web/admin_api/admin_api_controller.ex index 49d237661..2b66a1848 100644 --- a/lib/pleroma/web/admin_api/admin_api_controller.ex +++ b/lib/pleroma/web/admin_api/admin_api_controller.ex @@ -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)