mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2025-01-23 00:58:41 +00:00
18 lines
429 B
Elixir
18 lines
429 B
Elixir
|
defmodule EventosWeb.MemberView do
|
||
|
use EventosWeb, :view
|
||
|
alias EventosWeb.MemberView
|
||
|
|
||
|
def render("index.json", %{members: members}) do
|
||
|
%{data: render_many(members, MemberView, "member.json")}
|
||
|
end
|
||
|
|
||
|
def render("show.json", %{member: member}) do
|
||
|
%{data: render_one(member, MemberView, "member.json")}
|
||
|
end
|
||
|
|
||
|
def render("member.json", %{member: member}) do
|
||
|
%{id: member.id,
|
||
|
role: member.role}
|
||
|
end
|
||
|
end
|