logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 41493bd6428d42e1be4ba7294334310cb74c3e1e
parent a3426fcaf38b5533a553e0ffe3f031c4bb27cad5
Author: Mark Felder <feld@feld.me>
Date:   Tue, 30 Jan 2024 14:13:23 -0500

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

This reverts commit 378edeaf159c0ff98780ad1b41f513992f1af305.

Diffstat:

Mlib/pleroma/web/api_spec/operations/domain_block_operation.ex4++--
Mlib/pleroma/web/mastodon_api/controllers/domain_block_controller.ex4++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/pleroma/web/api_spec/operations/domain_block_operation.ex b/lib/pleroma/web/api_spec/operations/domain_block_operation.ex @@ -73,10 +73,10 @@ defmodule Pleroma.Web.ApiSpec.DomainBlockOperation do %Schema{ type: :object, properties: %{ - "domain" => %Schema{type: :string} + domain: %Schema{type: :string} } }, - required: true, + required: false, example: %{ "domain" => "facebook.com" } diff --git a/lib/pleroma/web/mastodon_api/controllers/domain_block_controller.ex b/lib/pleroma/web/mastodon_api/controllers/domain_block_controller.ex @@ -27,7 +27,7 @@ defmodule Pleroma.Web.MastodonAPI.DomainBlockController 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 @@ defmodule Pleroma.Web.MastodonAPI.DomainBlockController 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