Add spec for AccountController.unfollow

This commit is contained in:
Egor Kislitsyn 2020-04-09 17:57:21 +04:00
commit aa958a6dda
No known key found for this signature in database
GPG key ID: 1B49CB15B71E7805
3 changed files with 28 additions and 6 deletions

View file

@ -225,7 +225,20 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do
}
end
def unfollow_operation, do: :ok
def unfollow_operation do
%Operation{
tags: ["accounts"],
summary: "Unfollow",
operationId: "AccountController.unfollow",
security: [%{"oAuth" => ["follow", "write:follows"]}],
description: "Unfollow the given account",
parameters: [%Reference{"$ref": "#/components/parameters/accountIdOrNickname"}],
responses: %{
200 => Operation.response("Relationship", "application/json", AccountRelationship)
}
}
end
def mute_operation, do: :ok
def unmute_operation, do: :ok
def block_operation, do: :ok

View file

@ -93,7 +93,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do
:followers,
:following,
:lists,
:follow
:follow,
:unfollow
]
)