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
+ def update_notificaton_settings(%{assigns: %{user: user}} = conn, params) do
+ with {:ok, _} <- User.update_notification_settings(user, params) do
+ json(conn, %{status: "success"})
+ end
+ end
+
def follow_import(conn, %{"list" => %Plug.Upload{} = listfile}) do
follow_import(conn, %{"list" => File.read!(listfile.path)})
end