memEx/lib/memex_web/live/home_live.ex
shibao 63d854ffbe
All checks were successful
continuous-integration/drone/push Build is passing
upgrade to phoenix 1.7
2023-04-13 23:29:29 -04:00

17 lines
389 B
Elixir

defmodule MemexWeb.HomeLive do
@moduledoc """
Liveview for the main home page
"""
use MemexWeb, :live_view
alias Memex.Accounts
@version Mix.Project.config()[:version]
@impl true
def mount(_params, _session, socket) do
admins = Accounts.list_users_by_role(:admin)
{:ok, socket |> assign(page_title: gettext("home"), admins: admins, version: @version)}
end
end