16
lib/eventos_web/views/search_view.ex
Normal file
16
lib/eventos_web/views/search_view.ex
Normal file
@@ -0,0 +1,16 @@
|
||||
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"),
|
||||
actors: render_many(actors, ActorView, "acccount_basic.json"),
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user