fix routes

master
James Sigurðarson 2016-08-12 15:11:25 +01:00
parent 9860d1e1e5
commit 9b70954392
1 changed files with 3 additions and 3 deletions

View File

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