|
|
@ -95,7 +95,6 @@ def addme():
|
|
|
|
return render_template('appresponse.html', message='Only one meal per person!')
|
|
|
|
return render_template('appresponse.html', message='Only one meal per person!')
|
|
|
|
|
|
|
|
|
|
|
|
@app.route('/')
|
|
|
|
@app.route('/')
|
|
|
|
@login_required
|
|
|
|
|
|
|
|
def index():
|
|
|
|
def index():
|
|
|
|
return render_template('meal_list.html', leaderboard=getLeaderboard(), meals=getUpcomingMeals())
|
|
|
|
return render_template('meal_list.html', leaderboard=getLeaderboard(), meals=getUpcomingMeals())
|
|
|
|
|
|
|
|
|
|
|
@ -114,7 +113,7 @@ def login():
|
|
|
|
u = User.get(username)
|
|
|
|
u = User.get(username)
|
|
|
|
u.user_id = result[0]['id']
|
|
|
|
u.user_id = result[0]['id']
|
|
|
|
login_user(u)
|
|
|
|
login_user(u)
|
|
|
|
return redirect(request.args.get("next"))
|
|
|
|
return redirect(request.args.get('next') or url_for('index'))
|
|
|
|
return abort(401)
|
|
|
|
return abort(401)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
return Response('''
|
|
|
|
return Response('''
|
|
|
|