user: make User.delete() return data consistent with Object.delete()
authorWilliam Pitcock <nenolod@dereferenced.org>
Thu, 1 Nov 2018 07:56:21 +0000 (07:56 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Thu, 1 Nov 2018 07:56:21 +0000 (07:56 +0000)
lib/mix/tasks/rm_user.ex
lib/pleroma/user.ex

index 27521b745767e39d26e76e9a558651708acd79ff..b7c922d6cddf009cffb9dfd21a6b97361d8d95a3 100644 (file)
@@ -7,7 +7,7 @@ defmodule Mix.Tasks.RmUser do
     Mix.Task.run("app.start")
 
     with %User{local: true} = user <- User.get_by_nickname(nickname) do
-      User.delete(user)
+      {:ok, _} = User.delete(user)
     end
   end
 end
index f724f8a5b9a9feb6e15d06cb5f6c2bef8b6ef00e..b2f59ab6b61abc7a55df3fdd533a52c317635d85 100644 (file)
@@ -657,7 +657,7 @@ defmodule Pleroma.User do
       end
     end)
 
-    :ok
+    {:ok, user}
   end
 
   def html_filter_policy(%User{info: %{"no_rich_text" => true}}) do