logo

pleroma

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

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

This reverts commit e53c20b03c934c725726f49b2ca98b0bd9406bef.

Diffstat:

Mlib/pleroma/web/api_spec/operations/account_operation.ex6+++---
Mlib/pleroma/web/mastodon_api/controllers/account_controller.ex4++--
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/pleroma/web/api_spec/operations/account_operation.ex b/lib/pleroma/web/api_spec/operations/account_operation.ex @@ -887,9 +887,9 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do description: "POST body for muting an account", type: :object, properties: %{ - "uri" => %Schema{type: :string, nullable: true, format: :uri} + uri: %Schema{type: :string, nullable: true, format: :uri} }, - required: ["uri"] + required: [:uri] } end @@ -930,7 +930,7 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do description: "POST body for adding a note for an account", type: :object, properties: %{ - "comment" => %Schema{ + comment: %Schema{ type: :string, description: "Account note body" } diff --git a/lib/pleroma/web/mastodon_api/controllers/account_controller.ex b/lib/pleroma/web/mastodon_api/controllers/account_controller.ex @@ -472,7 +472,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do @doc "POST /api/v1/accounts/:id/note" def note( - %{assigns: %{user: noter, account: target}, body_params: %{"comment" => comment}} = conn, + %{assigns: %{user: noter, account: target}, body_params: %{comment: comment}} = conn, _params ) do with {:ok, _user_note} <- UserNote.create(noter, target, comment) do @@ -513,7 +513,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do end @doc "POST /api/v1/follows" - def follow_by_uri(%{body_params: %{"uri" => uri}} = conn, _) do + def follow_by_uri(%{body_params: %{uri: uri}} = conn, _) do case User.get_cached_by_nickname(uri) do %User{} = user -> conn