Revert "Pleroma.Web.MastodonAPI.DomainBlockController: dialyzer errors"

This reverts commit 378edeaf15.
This commit is contained in:
Mark Felder 2024-01-30 14:13:23 -05:00
parent a3426fcaf3
commit 41493bd642
2 changed files with 4 additions and 4 deletions

View File

@ -73,10 +73,10 @@ defmodule Pleroma.Web.ApiSpec.DomainBlockOperation do
%Schema{ %Schema{
type: :object, type: :object,
properties: %{ properties: %{
"domain" => %Schema{type: :string} domain: %Schema{type: :string}
} }
}, },
required: true, required: false,
example: %{ example: %{
"domain" => "facebook.com" "domain" => "facebook.com"
} }

View File

@ -27,7 +27,7 @@ defmodule Pleroma.Web.MastodonAPI.DomainBlockController do
end end
@doc "POST /api/v1/domain_blocks" @doc "POST /api/v1/domain_blocks"
def create(%{assigns: %{user: blocker}, body_params: %{"domain" => domain}} = conn, _params) do def create(%{assigns: %{user: blocker}, body_params: %{domain: domain}} = conn, _params) do
User.block_domain(blocker, domain) User.block_domain(blocker, domain)
json(conn, %{}) json(conn, %{})
end end
@ -38,7 +38,7 @@ defmodule Pleroma.Web.MastodonAPI.DomainBlockController do
end end
@doc "DELETE /api/v1/domain_blocks" @doc "DELETE /api/v1/domain_blocks"
def delete(%{assigns: %{user: blocker}, body_params: %{"domain" => domain}} = conn, _params) do def delete(%{assigns: %{user: blocker}, body_params: %{domain: domain}} = conn, _params) do
User.unblock_domain(blocker, domain) User.unblock_domain(blocker, domain)
json(conn, %{}) json(conn, %{})
end end