+ emoji =
+ Emoji.get_all()
+ |> Enum.map(fn {short_code, path, tags} ->
+ {short_code, %{image_url: path, tags: 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