small refactoring

This commit is contained in:
Maksim Pechnikov 2020-09-17 09:13:43 +03:00
commit 5a8ea0a5b0
2 changed files with 5 additions and 34 deletions

View file

@ -65,20 +65,14 @@ defmodule Pleroma.User.Import do
def blocks_import(%User{} = blocker, [_ | _] = identifiers) do
BackgroundWorker.enqueue(
"blocks_import",
%{
"blocker_id" => blocker.id,
"blocked_identifiers" => identifiers
}
%{"user_id" => blocker.id, "identifiers" => identifiers}
)
end
def follow_import(%User{} = follower, [_ | _] = identifiers) do
BackgroundWorker.enqueue(
"follow_import",
%{
"follower_id" => follower.id,
"followed_identifiers" => identifiers
}
%{"user_id" => follower.id, "identifiers" => identifiers}
)
end