[#2409] Made GET /api/v1/accounts/:id/favourites auth-optional, adjusted tests.

This commit is contained in:
Ivan Tashkinov 2020-04-24 22:25:27 +03:00
commit b4139cc547
4 changed files with 24 additions and 10 deletions

View file

@ -39,7 +39,10 @@ defmodule Pleroma.Web.PleromaAPI.AccountController do
]
)
plug(OAuthScopesPlug, %{scopes: ["read:favourites"]} when action == :favourites)
plug(
OAuthScopesPlug,
%{scopes: ["read:favourites"], fallback: :proceed_unauthenticated} when action == :favourites
)
plug(RateLimiter, [name: :account_confirmation_resend] when action == :confirmation_resend)