Add specs for AccountController.mutes, AccountController.blocks, AccountController.mutes, AccountController.endorsements

This commit is contained in:
Egor Kislitsyn 2020-04-09 20:34:21 +04:00
commit 7e0b42d99f
No known key found for this signature in database
GPG key ID: 1B49CB15B71E7805
3 changed files with 41 additions and 25 deletions

View file

@ -80,28 +80,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do
plug(RateLimiter, [name: :app_account_creation] when action == :create)
plug(:assign_account_by_id when action in @needs_account)
plug(
OpenApiSpex.Plug.CastAndValidate,
[render_error: Pleroma.Web.ApiSpec.RenderError]
when action in [
:create,
:verify_credentials,
:update_credentials,
:relationships,
:show,
:statuses,
:followers,
:following,
:lists,
:follow,
:unfollow,
:mute,
:unmute,
:block,
:unblock,
:follows
]
)
plug(OpenApiSpex.Plug.CastAndValidate, render_error: Pleroma.Web.ApiSpec.RenderError)
action_fallback(Pleroma.Web.MastodonAPI.FallbackController)