diff --git a/app/routes.py b/app/routes.py index 8aa3782..e18cc06 100644 --- a/app/routes.py +++ b/app/routes.py @@ -9,11 +9,12 @@ def home(): @app.route('/menu') def menu(): - today = Menu.query.first() - if today: - body = { "today_special": today.name } + all_items = Menu.query.all() + if all_items: + menu_list = [{"id": item.id, "name": item.name, "price": item.price} for item in all_items] + body = { "menu": menu_list } status = 200 else: - body = { "error": "Sorry, the service is not available today." } + body = { "error": "Sorry, no menu items are available today." } status = 404 - return jsonify(body), status \ No newline at end of file + return jsonify(body), status diff --git a/new-repo1 b/new-repo1 new file mode 160000 index 0000000..35115e7 --- /dev/null +++ b/new-repo1 @@ -0,0 +1 @@ +Subproject commit 35115e75771b8bf6b76176383bc0a54f45ac8844