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: tags}}
end)
|> Enum.into(%{})
def captcha(conn, _params) do
json(conn, Pleroma.Captcha.new())
end
+
+ def healthcheck(conn, _params) do
+ info = Pleroma.Healthcheck.system_info()
+
+ conn =
+ if info.healthy do
+ conn
+ else
+ Plug.Conn.put_status(conn, :service_unavailable)
+ end
+
+ json(conn, info)
+ end
end