Rename project to Mobilizon
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
19
lib/mobilizon_web/views/participant_view.ex
Normal file
19
lib/mobilizon_web/views/participant_view.ex
Normal file
@@ -0,0 +1,19 @@
|
||||
defmodule MobilizonWeb.ParticipantView do
|
||||
@moduledoc """
|
||||
View for Participants
|
||||
"""
|
||||
use MobilizonWeb, :view
|
||||
alias MobilizonWeb.ParticipantView
|
||||
|
||||
def render("index.json", %{participants: participants}) do
|
||||
%{data: render_many(participants, ParticipantView, "participant.json")}
|
||||
end
|
||||
|
||||
def render("show.json", %{participant: participant}) do
|
||||
%{data: render_one(participant, ParticipantView, "participant.json")}
|
||||
end
|
||||
|
||||
def render("participant.json", %{participant: participant}) do
|
||||
%{id: participant.id, role: participant.role}
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user