1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-23 16:33:28 +00:00
mobilizon/lib/mobilizon_web/views/follower_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

16 lines
494 B
Elixir

defmodule MobilizonWeb.FollowerView do
use MobilizonWeb, :view
alias MobilizonWeb.FollowerView
def render("index.json", %{followers: followers}) do
%{data: render_many(followers, FollowerView, "follower.json")}
end
def render("show.json", %{follower: follower}) do
%{data: render_one(follower, FollowerView, "follower.json")}
end
def render("follower.json", %{follower: follower}) do
%{id: follower.id, approved: follower.approved, score: follower.score}
end
end