Change response format of /api/pleroma/emoji to the one that actually makes sense

This commit is contained in:
rinpatch 2019-04-09 23:20:31 +03:00
commit b57b43027c
3 changed files with 34 additions and 14 deletions

View file

@ -286,8 +286,9 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
emoji =
Emoji.get_all()
|> Enum.map(fn {short_code, path, tags} ->
%{short_code => %{image_url: path, tags: String.split(tags, ",")}}
{short_code, %{image_url: path, tags: String.split(tags, ",")}}
end)
|> Enum.into(%{})
json(conn, emoji)
end