mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-23 15:05:45 +00:00
Switch to User.delete for rm_user task
This commit is contained in:
parent
4478b9115c
commit
13a64b82e3
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue