defmodule ComfycampWeb.UserEditorController do use ComfycampWeb, :controller alias Comfycamp.Accounts def index(conn, _params) do users = Accounts.list_users() conn |> put_layout(html: :admin) |> render(:index, page_title: "Пользователи", users: users, stylesheets: ["/assets/admin.css"] ) end def show(conn, %{"id" => id}) do user = Accounts.get_user!(id) conn |> put_layout(html: :admin) |> render(:show, page_title: user.email, user: user, stylesheets: ["/assets/admin.css"]) end end