Merge branch 'mrf-docs-update' into 'develop'
[akkoma] / lib / pleroma / web / mastodon_api / controllers / suggestion_controller.ex
index 0cdc7bd8d9e1316b66ccbdfe3925be03dcc879ad..c93a439696223e619263c03a94260988f4fd36c6 100644 (file)
@@ -5,10 +5,13 @@
 defmodule Pleroma.Web.MastodonAPI.SuggestionController do
   use Pleroma.Web, :controller
 
+  alias Pleroma.Plugs.OAuthScopesPlug
+
   require Logger
 
+  plug(OAuthScopesPlug, %{scopes: ["read"]} when action == :index)
+
   @doc "GET /api/v1/suggestions"
-  def index(conn, _) do
-    json(conn, [])
-  end
+  def index(conn, params),
+    do: Pleroma.Web.MastodonAPI.MastodonAPIController.empty_array(conn, params)
 end