|
|
|
@ -148,8 +148,9 @@ def addme():
|
|
|
|
|
results = []
|
|
|
|
|
for row in r:
|
|
|
|
|
results.append(dict(row))
|
|
|
|
|
|
|
|
|
|
if not results[0]['is_eater']:
|
|
|
|
|
if not results[0]['is_eater'] == 'True':
|
|
|
|
|
query = "UPDATE meals SET eaters = array_cat(eaters, '{:user_id}') where id=:meal_id;"
|
|
|
|
|
r = db_engine.execute(text(query), user_id=current_user.user_id, meal_id = meal_id)
|
|
|
|
|
return render_template('appresponse.html', message='Have a nice meal ' + meal_id + " mister " + str(current_user.name) )
|
|
|
|
|
else:
|
|
|
|
|
return render_template('appresponse.html', message='You are already a registered eater')
|
|
|
|
|