diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-10-07 11:06:30 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-10-07 11:06:30 +0300 |
commit | 28fb98d69e31ce5a09e15e213491b880430a0902 (patch) | |
tree | 2910113e8a4ed4d225a4ffc8b6b95d56e782367f /lib/pleroma/web/mastodon_api/controllers/suggestion_controller.ex | |
parent | f459aabdfafa990b33610438650f882ccac072d2 (diff) | |
parent | b4f3c16885a489c40de82e5ef321caafa4b10c81 (diff) | |
download | pleroma-28fb98d69e31ce5a09e15e213491b880430a0902.tar.gz pleroma-28fb98d69e31ce5a09e15e213491b880430a0902.zip |
Merge remote-tracking branch 'remotes/upstream/develop' into 1260-rate-limited-auth-actions
# Conflicts:
# CHANGELOG.md
Diffstat (limited to 'lib/pleroma/web/mastodon_api/controllers/suggestion_controller.ex')
-rw-r--r-- | lib/pleroma/web/mastodon_api/controllers/suggestion_controller.ex | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/pleroma/web/mastodon_api/controllers/suggestion_controller.ex b/lib/pleroma/web/mastodon_api/controllers/suggestion_controller.ex index 9076bb849..fe71c36af 100644 --- a/lib/pleroma/web/mastodon_api/controllers/suggestion_controller.ex +++ b/lib/pleroma/web/mastodon_api/controllers/suggestion_controller.ex @@ -8,11 +8,16 @@ defmodule Pleroma.Web.MastodonAPI.SuggestionController do require Logger alias Pleroma.Config + alias Pleroma.Plugs.OAuthScopesPlug alias Pleroma.User alias Pleroma.Web.MediaProxy action_fallback(Pleroma.Web.MastodonAPI.FallbackController) + plug(OAuthScopesPlug, %{scopes: ["read"]} when action == :index) + + plug(Pleroma.Plugs.EnsurePublicOrAuthenticatedPlug) + @doc "GET /api/v1/suggestions" def index(%{assigns: %{user: user}} = conn, _) do if Config.get([:suggestions, :enabled], false) do |