mobilizon.chapril.org-mobil.../lib/eventos_web/views/search_view.ex
Thomas Citharel dee437e4f3 Allow multiple identities (accounts actors) for one user.
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-07-10 10:00:07 +02:00

17 lines
416 B
Elixir

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, "actor_basic.json"),
}
}
end
end