mirror of
https://git.youjo.love/youjo/youjo-be.git
synced 2025-01-19 18:56:08 +01:00
14 lines
303 B
Elixir
14 lines
303 B
Elixir
defmodule Mix.Tasks.RmUser do
|
|
use Mix.Task
|
|
import Mix.Ecto
|
|
alias Pleroma.{Repo, 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)
|
|
end
|
|
end
|
|
end
|