2018-05-30 14:27:21 +02:00
|
|
|
defmodule EventosWeb.SearchView do
|
|
|
|
@moduledoc """
|
|
|
|
View for Events
|
|
|
|
"""
|
|
|
|
use EventosWeb, :view
|
|
|
|
alias EventosWeb.{EventView, ActorView, GroupView, AddressView}
|
|
|
|
|
|
|
|
def render("search.json", %{events: events, actors: actors}) do
|
|
|
|
%{
|
|
|
|
data: %{
|
|
|
|
events: render_many(events, EventView, "event_simple.json"),
|
2018-07-27 10:45:35 +02:00
|
|
|
actors: render_many(actors, ActorView, "actor_basic.json")
|
2018-05-30 14:27:21 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|