Add OpenAPI spec for CustomEmojiController

This commit is contained in:
Egor Kislitsyn 2020-04-13 21:21:04 +04:00
commit c28aaf9d82
No known key found for this signature in database
GPG key ID: 1B49CB15B71E7805
5 changed files with 124 additions and 4 deletions

View file

@ -5,6 +5,10 @@
defmodule Pleroma.Web.MastodonAPI.CustomEmojiController do
use Pleroma.Web, :controller
plug(OpenApiSpex.Plug.CastAndValidate)
defdelegate open_api_operation(action), to: Pleroma.Web.ApiSpec.CustomEmojiOperation
def index(conn, _params) do
render(conn, "index.json", custom_emojis: Pleroma.Emoji.get_all())
end