forked from potsda.mn/mobilizon
Remove unused files
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
909833c2bb
commit
6f15127cb0
|
@ -1,16 +0,0 @@
|
|||
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
|
|
@ -1,41 +0,0 @@
|
|||
defmodule MobilizonWeb.GroupView do
|
||||
@moduledoc """
|
||||
View for Groups
|
||||
"""
|
||||
use MobilizonWeb, :view
|
||||
alias MobilizonWeb.{GroupView, ActorView}
|
||||
|
||||
def render("index.json", %{groups: groups}) do
|
||||
%{data: render_many(groups, GroupView, "group_simple.json")}
|
||||
end
|
||||
|
||||
def render("show.json", %{group: group}) do
|
||||
%{data: render_one(group, GroupView, "group.json")}
|
||||
end
|
||||
|
||||
def render("show_simple.json", %{group: group}) do
|
||||
%{data: render_one(group, GroupView, "group_simple.json")}
|
||||
end
|
||||
|
||||
def render("group_simple.json", %{group: group}) do
|
||||
%{
|
||||
id: group.id,
|
||||
title: group.title,
|
||||
description: group.description,
|
||||
suspended: group.suspended,
|
||||
url: group.url
|
||||
}
|
||||
end
|
||||
|
||||
def render("group.json", %{group: group}) do
|
||||
%{
|
||||
id: group.id,
|
||||
title: group.title,
|
||||
description: group.description,
|
||||
suspended: group.suspended,
|
||||
url: group.url,
|
||||
members: render_many(group.members, ActorView, "actor_basic.json"),
|
||||
events: render_many(group.organized_events, EventView, "event_simple.json")
|
||||
}
|
||||
end
|
||||
end
|
|
@ -1,23 +0,0 @@
|
|||
defmodule MobilizonWeb.MemberView do
|
||||
@moduledoc """
|
||||
View for Members
|
||||
"""
|
||||
use MobilizonWeb, :view
|
||||
alias MobilizonWeb.{MemberView, ActorView}
|
||||
|
||||
def render("index.json", %{members: members}) do
|
||||
%{data: render_many(members, MemberView, "member.json")}
|
||||
end
|
||||
|
||||
def render("show.json", %{member: member}) do
|
||||
%{data: render_one(member, MemberView, "member.json")}
|
||||
end
|
||||
|
||||
def render("member.json", %{member: member}) do
|
||||
%{
|
||||
role: member.role,
|
||||
actor: render_one(member.actor, ActorView, "actor_basic.json"),
|
||||
group: render_one(member.parent, ActorView, "actor_basic.json")
|
||||
}
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue