Implemented get kuk candidate

master
Davide Bongiovanni 6 years ago
parent 64396c29d8
commit ba5e35993d

@ -190,9 +190,11 @@ def search_users():
def get_kuk_candidate(): def get_kuk_candidate():
date = datetime.datetime.strptime(request.args.get('date'), '%Y-%m-%d %H:%M') date = datetime.datetime.strptime(request.args.get('date'), '%Y-%m-%d %H:%M')
meal_eaters = request.args.get('eaters').split(',') meal_eaters = request.args.get('eaters').split(',')
u_meals = getUpcomingMeals()
# TODO: Implement leaderboard = getLeaderboard()
return 'davide' for meal in u_meals:
leaderboard = applyTempMeal(leaderboard, meal)
return [e['name'] for e in leaderboard if e['name'] in eaters][0]
@app.route('/login', methods=['GET', 'POST']) @app.route('/login', methods=['GET', 'POST'])
def login(): def login():

Loading…
Cancel
Save