You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
651 B
24 lines
651 B
json.count @count
|
|
json.competition_teams do
|
|
json.array! @teams.each do |team|
|
|
json.extract! team, :id, :name, :invite_code
|
|
json.team_type team.en_team_type
|
|
json.school_name team.user.school_name
|
|
|
|
json.manage_permission current_user.id == team.user_id
|
|
|
|
json.creator do
|
|
json.partial! 'users/user_simple', user: team.user
|
|
json.role team.team_members.find(&:creator?).en_role
|
|
end
|
|
|
|
json.team_members do
|
|
json.array! team.team_members.each do |member|
|
|
json.partial! 'users/user_simple', user: member.user
|
|
json.user_id member.user_id
|
|
json.role member.en_role
|
|
end
|
|
end
|
|
end
|
|
end
|