Revert "Pleroma.Web.MastodonAPI.DomainBlockController: dialyzer errors"
This reverts commit 378edeaf15
.
This commit is contained in:
parent
a3426fcaf3
commit
41493bd642
|
@ -73,10 +73,10 @@ defp domain_block_request do
|
|||
%Schema{
|
||||
type: :object,
|
||||
properties: %{
|
||||
"domain" => %Schema{type: :string}
|
||||
domain: %Schema{type: :string}
|
||||
}
|
||||
},
|
||||
required: true,
|
||||
required: false,
|
||||
example: %{
|
||||
"domain" => "facebook.com"
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ def index(%{assigns: %{user: user}} = conn, _) do
|
|||
end
|
||||
|
||||
@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)
|
||||
json(conn, %{})
|
||||
end
|
||||
|
@ -38,7 +38,7 @@ def create(%{assigns: %{user: blocker}} = conn, %{domain: domain}) do
|
|||
end
|
||||
|
||||
@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)
|
||||
json(conn, %{})
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue