Ivan Reshetnikov
45c91eb3bf
I just added is_admin field to user schema, /admin scope, admin page controller and view. No extra functions were implemented.
27 lines
600 B
Elixir
27 lines
600 B
Elixir
defmodule ComfycampWeb.AdminPageController do
|
|
use ComfycampWeb, :controller
|
|
|
|
def home(conn, _params) do
|
|
conn
|
|
|> put_layout(html: :admin)
|
|
|> render(:home, page_title: "Админка")
|
|
end
|
|
|
|
def posts(conn, _params) do
|
|
conn
|
|
|> put_layout(html: :admin)
|
|
|> render(:home, page_title: "Админка")
|
|
end
|
|
|
|
def users(conn, _params) do
|
|
conn
|
|
|> put_layout(html: :admin)
|
|
|> render(:home, page_title: "Админка")
|
|
end
|
|
|
|
def services(conn, _params) do
|
|
conn
|
|
|> put_layout(html: :admin)
|
|
|> render(:home, page_title: "Админка")
|
|
end
|
|
end
|