diff --git a/lib/pleroma/web/api_spec/operations/account_operation.ex b/lib/pleroma/web/api_spec/operations/account_operation.ex index 75cea2184..5d8d16e98 100644 --- a/lib/pleroma/web/api_spec/operations/account_operation.ex +++ b/lib/pleroma/web/api_spec/operations/account_operation.ex @@ -882,9 +882,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 @@ -925,7 +925,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 1b5de4b45..fdf9d2dfb 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