memEx/lib/memex_web/live/home_live.ex

17 lines
389 B
Elixir
Raw Permalink Normal View History

2022-07-25 19:31:54 -04:00
defmodule MemexWeb.HomeLive do
2022-01-22 20:44:38 -05:00
@moduledoc """
Liveview for the main home page
"""
2022-07-25 19:31:54 -04:00
use MemexWeb, :live_view
2022-07-30 16:20:32 -04:00
alias Memex.Accounts
2021-03-11 21:12:55 -05:00
2023-02-04 17:36:27 -05:00
@version Mix.Project.config()[:version]
2021-03-11 21:12:55 -05:00
@impl true
2022-05-05 20:55:59 -04:00
def mount(_params, _session, socket) do
2022-07-30 16:20:32 -04:00
admins = Accounts.list_users_by_role(:admin)
2022-11-27 21:33:06 -05:00
{:ok, socket |> assign(page_title: gettext("home"), admins: admins, version: @version)}
2021-03-11 21:12:55 -05:00
end
end