Switch to User.delete for rm_user task
authorPhenethylamine <phenethylamine@tutanota.com>
Thu, 12 Apr 2018 18:30:53 +0000 (14:30 -0400)
committerPhenethylamine <phenethylamine@tutanota.com>
Thu, 12 Apr 2018 18:30:53 +0000 (14:30 -0400)
lib/mix/tasks/rm_user.ex

index 30196d502c3009332b6c03866c568ed15074d2cc..aa0cf4951536dd5a7528118615dd217e2f1d1744 100644 (file)
@@ -1,14 +1,14 @@
 defmodule Mix.Tasks.RmUser do
   use Mix.Task
   import Mix.Ecto
-  alias Pleroma.{Repo, User}
+  alias Pleroma.User
 
   @shortdoc "Permanently delete a user"
   def run([nickname]) do
     ensure_started(Repo, [])
 
     with %User{local: true} = user <- User.get_by_nickname(nickname) do
-      Repo.delete!(user)
+      user.delete()
     end
   end
 end