diff options
author | Mark Felder <feld@feld.me> | 2024-01-30 14:13:46 -0500 |
---|---|---|
committer | Mark Felder <feld@feld.me> | 2024-01-30 14:13:46 -0500 |
commit | 1fa1a93cd6ffefaa80a660fa48968f83b925b21a (patch) | |
tree | 03b332e20f6e5bc90cc750e7e18678ece053b3c3 | |
parent | 41493bd6428d42e1be4ba7294334310cb74c3e1e (diff) | |
download | pleroma-1fa1a93cd6ffefaa80a660fa48968f83b925b21a.tar.gz pleroma-1fa1a93cd6ffefaa80a660fa48968f83b925b21a.zip |
Revert "Pleroma.Web.MastodonAPI.AccountController: dialyzer errors"
This reverts commit e53c20b03c934c725726f49b2ca98b0bd9406bef.
-rw-r--r-- | lib/pleroma/web/api_spec/operations/account_operation.ex | 6 | ||||
-rw-r--r-- | lib/pleroma/web/mastodon_api/controllers/account_controller.ex | 4 |
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 index 357022973..36025e47a 100644 --- 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 index fdf9d2dfb..1b5de4b45 100644 --- 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 |