|
|
|
@ -13,7 +13,7 @@ class Competitions::CertificatesController < Competitions::BaseController
|
|
|
|
|
def team
|
|
|
|
|
team = CompetitionTeam.find(params[:id])
|
|
|
|
|
return render_forbidden unless team.team_members.exists?(user_id: current_user.id)
|
|
|
|
|
return render_not_found unless team.certificate_exist?
|
|
|
|
|
return render_not_found unless team.certificate_exists?
|
|
|
|
|
|
|
|
|
|
prize = team.competition_prize_users.first.competition_prize
|
|
|
|
|
filename = "#{current_competition.name}-#{prize.name}-#{team.name}.pdf"
|
|
|
|
|