Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 line
640B

  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.CustomEmojiController do
  5. use Pleroma.Web, :controller
  6. plug(Pleroma.Web.ApiSpec.CastAndValidate)
  7. plug(
  8. :skip_plug,
  9. [Pleroma.Web.Plugs.OAuthScopesPlug, Pleroma.Web.Plugs.EnsurePublicOrAuthenticatedPlug]
  10. when action == :index
  11. )
  12. defdelegate open_api_operation(action), to: Pleroma.Web.ApiSpec.CustomEmojiOperation
  13. def index(conn, _params) do
  14. render(conn, "index.json", custom_emojis: Pleroma.Emoji.get_all())
  15. end
  16. end