添加队员角色

dev_local_lzdx
anke1460 4 years ago
parent 5dd7193204
commit 378bd46513

@ -235,8 +235,8 @@ class SourcesService
comp = Competition.find_by_identifier params[:identifier]
team_ids = comp.competition_teams.pluck(:id)
user_team = TeamMember.where(:competition_team_id => team_ids, :user_id => params[:user_id]).first
user_ids =TeamMember.where(:competition_team_id => user_team.try(:competition_team_id)).pluck(:user_id)
{team_user_ids: user_ids}
users =TeamMember.where(:competition_team_id => user_team.try(:competition_team_id))
{team_user_ids: users.as_json(only: [:user_id, :role])}
end
def get_team_ids params

Loading…
Cancel
Save