Revert "Pleroma.Web.AdminAPI.RelayController: dialyzer errors"

This reverts commit 94838ed941.
This commit is contained in:
Mark Felder 2024-01-30 14:14:22 -05:00
commit ac06a47689
2 changed files with 6 additions and 9 deletions

View file

@ -31,7 +31,7 @@ defmodule Pleroma.Web.AdminAPI.RelayController do
end
end
def follow(%{assigns: %{user: admin}, body_params: %{"relay_url" => target}} = conn, _) do
def follow(%{assigns: %{user: admin}, body_params: %{relay_url: target}} = conn, _) do
with {:ok, _message} <- Relay.follow(target) do
ModerationLog.insert_log(%{action: "relay_follow", actor: admin, target: target})
@ -44,11 +44,8 @@ defmodule Pleroma.Web.AdminAPI.RelayController do
end
end
def unfollow(
%{assigns: %{user: admin}, body_params: %{"relay_url" => target} = params} = conn,
_
) do
with {:ok, _message} <- Relay.unfollow(target, %{force: params["force"]}) do
def unfollow(%{assigns: %{user: admin}, body_params: %{relay_url: target} = params} = conn, _) do
with {:ok, _message} <- Relay.unfollow(target, %{force: params[:force]}) do
ModerationLog.insert_log(%{action: "relay_unfollow", actor: admin, target: target})
json(conn, target)