fix routes
parent
9860d1e1e5
commit
9b70954392
|
@ -31,12 +31,12 @@ def confirmed_email_required(f):
|
|||
if "user_id" in session and session["user_id"]:
|
||||
if not g.user.email_confirmed:
|
||||
flash("Please confirm your email")
|
||||
return redirect(url_for('user_dashboard'))
|
||||
return redirect(url_for('users.dashboard'))
|
||||
else:
|
||||
return f(*args, **kwargs)
|
||||
else:
|
||||
flash("You need to be logged in to access that page.")
|
||||
return redirect(url_for('login'))
|
||||
return redirect(url_for('users.login'))
|
||||
return decorated
|
||||
|
||||
def competition_running_required(f):
|
||||
|
@ -44,7 +44,7 @@ def competition_running_required(f):
|
|||
def decorated(*args, **kwargs):
|
||||
if not config.competition_is_running() and not ("admin" in session and session["admin"]):
|
||||
flash("The competition hasn't started")
|
||||
return redirect(url_for('scoreboard'))
|
||||
return redirect(url_for('scoreboard.index'))
|
||||
return f(*args, **kwargs)
|
||||
return decorated
|
||||
|
||||
|
|
Loading…
Reference in New Issue