Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

33 рядки
977B

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