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

This reverts commit e53c20b03c.
This commit is contained in:
Mark Felder 2024-01-30 14:13:46 -05:00
parent 41493bd642
commit 1fa1a93cd6
2 changed files with 5 additions and 5 deletions

View File

@ -887,9 +887,9 @@ defp follow_by_uri_request 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 @@ defp note_request do
description: "POST body for adding a note for an account",
type: :object,
properties: %{
"comment" => %Schema{
comment: %Schema{
type: :string,
description: "Account note body"
}

View File

@ -472,7 +472,7 @@ def unblock(%{assigns: %{user: blocker, account: blocked}} = conn, _params) 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 @@ def remove_from_followers(%{assigns: %{user: followed, account: follower}} = con
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