mobilizon/lib/mobilizon_web/views/search_view.ex
Thomas Citharel 559c889f1b Rename project to Mobilizon
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-10-11 17:37:39 +02:00

17 lines
421 B
Elixir

defmodule MobilizonWeb.SearchView do
@moduledoc """
View for Events
"""
use MobilizonWeb, :view
alias MobilizonWeb.{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, "actor_basic.json")
}
}
end
end