mobilizon.chapril.org-mobil.../lib/eventos_web/views/bot_view.ex
Thomas Citharel 979aad5acb Remove credo and use mix format, and lint everything
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2018-07-27 10:45:35 +02:00

17 lines
392 B
Elixir

defmodule EventosWeb.BotView do
use EventosWeb, :view
alias EventosWeb.BotView
def render("index.json", %{bots: bots}) do
%{data: render_many(bots, BotView, "bot.json")}
end
def render("show.json", %{bot: bot}) do
%{data: render_one(bot, BotView, "bot.json")}
end
def render("bot.json", %{bot: bot}) do
%{id: bot.id, source: bot.source, type: bot.type}
end
end