23 lines
565 B
Elixir
23 lines
565 B
Elixir
defmodule ComfycampWeb.AdminPageController do
|
|
use ComfycampWeb, :controller
|
|
alias Comfycamp.Accounts
|
|
|
|
def home(conn, _params) do
|
|
user_count = Accounts.count_users()
|
|
unapproved_user_count = Accounts.count_unapproved_users()
|
|
|
|
conn
|
|
|> put_layout(html: :admin)
|
|
|> render(:home,
|
|
page_title: "Админка",
|
|
user_count: user_count,
|
|
unapproved_user_count: unapproved_user_count
|
|
)
|
|
end
|
|
|
|
def services(conn, _params) do
|
|
conn
|
|
|> put_layout(html: :admin)
|
|
|> render(:home, page_title: "Админка")
|
|
end
|
|
end
|