def get():
if 'status' in session and session['status'] == 1:
return "Your coffee is ready but you don't have milk in it.",406
if 'status' in session and session['status'] == 3:
if 'milk' not in session or 'syrup' not in session:
return 'Not acceptable',406
if session['milk'] != "Half-and-half":
return "Your coffee is ready but you didn't put the right milk-type.",200
if session['syrup'] == '':
return "Your coffee is ready but you didn't put syrup in it.",200
if session['syrup'] != 'Raspberry':
return "Your coffee is ready but you didn't put the right syrup-type.",200
return 'Here is your coffee: INSA{April_Fool_of_Coffee_Machine}',200
else:
session.clear()
return 'Not acceptable',406
评论列表
文章目录