mobilizon.chapril.org-mobil.../lib/eventos_web/views/user_view.ex

12 lines
249 B
Elixir
Raw Normal View History

defmodule EventosWeb.UserView do
use EventosWeb, :view
import Logger
def render("user.json", %{"user": user}) do
%{
email: user.email,
account: render_one(user.account, EventosWeb.AccountView, "account.json"),
}
end
end