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) 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) end end