geo-therminator/lib/geo_therminator_web/live/main/index.ex
2021-11-07 11:01:39 +02:00

13 lines
424 B
Elixir

defmodule GeoTherminatorWeb.MainLive.Index do
use GeoTherminatorWeb, :live_view
@impl true
def mount(_params, _session, socket) do
user = GeoTherminator.PumpAPI.Auth.Server.get_auth(GeoTherminator.PumpAPI.Auth.Server)
installations =
GeoTherminator.PumpAPI.Auth.Server.get_installations(GeoTherminator.PumpAPI.Auth.Server)
{:ok, assign(socket, user: user, installations: installations)}
end
end