memEx/lib/memex_web/live/home_live.ex
shibao 501eb5d560
All checks were successful
continuous-integration/drone/push Build is passing
use project version on homepage
2022-11-27 21:33:06 -05:00

18 lines
426 B
Elixir

defmodule MemexWeb.HomeLive do
@moduledoc """
Liveview for the main home page
"""
@version Mix.Project.config()[:version]
use MemexWeb, :live_view
alias Memex.Accounts
alias MemexWeb.{Endpoint, FaqLive}
@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