Adding tag to emoji ets table

changes in apis
This commit is contained in:
Alex S 2019-04-01 17:17:57 +07:00
commit 3601f03147
14 changed files with 165 additions and 25 deletions

View file

@ -266,7 +266,13 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
end
def emoji(conn, _params) do
json(conn, Enum.into(Emoji.get_all(), %{}))
emoji =
Emoji.get_all()
|> Enum.map(fn {short_code, path, tags} ->
%{short_code => %{image_url: path, tags: String.split(tags, ",")}}
end)
json(conn, emoji)
end
def follow_import(conn, %{"list" => %Plug.Upload{} = listfile}) do