Rename Instance.delete_users_and_activities/1 to Instance.delete/1

This commit is contained in:
Mark Felder 2025-06-28 13:37:06 -07:00
commit 59844d0202
5 changed files with 6 additions and 6 deletions

View file

@ -38,7 +38,7 @@ defmodule Pleroma.Instances do
def delete_all_unreachable do
get_unreachable()
|> Enum.each(fn {domain, _} ->
Instance.delete_users_and_activities(domain)
Instance.delete(domain)
end)
end
end

View file

@ -296,7 +296,7 @@ defmodule Pleroma.Instances.Instance do
Deletes all users from an instance in a background task, thus also deleting
all of those users' activities and notifications.
"""
def delete_users_and_activities(host) when is_binary(host) do
def delete(host) when is_binary(host) do
DeleteWorker.new(%{"op" => "delete_instance", "host" => host})
|> Oban.insert()
end

View file

@ -49,7 +49,7 @@ defmodule Pleroma.Web.AdminAPI.InstanceController do
end
def delete(conn, %{"instance" => instance}) do
with {:ok, _job} <- Instance.delete_users_and_activities(instance) do
with {:ok, _job} <- Instance.delete(instance) do
json(conn, instance)
end
end