1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.MastodonAPI.SuggestionController do
6 use Pleroma.Web, :controller
10 plug(Pleroma.Web.ApiSpec.CastAndValidate)
11 plug(Pleroma.Web.Plugs.OAuthScopesPlug, %{scopes: ["read"]} when action == :index)
13 def open_api_operation(action) do
14 operation = String.to_existing_atom("#{action}_operation")
15 apply(__MODULE__, operation, [])
18 def index_operation do
19 %OpenApiSpex.Operation{
20 tags: ["Suggestions"],
21 summary: "Follow suggestions (Not implemented)",
22 operationId: "SuggestionController.index",
24 200 => Pleroma.Web.ApiSpec.Helpers.empty_array_response()
29 @doc "GET /api/v1/suggestions"
30 def index(conn, params),
31 do: Pleroma.Web.MastodonAPI.MastodonAPIController.empty_array(conn, params)