From c83fd742f77169ba38dc456eae1057acfd12b8bf Mon Sep 17 00:00:00 2001 From: Chathuni Date: Mon, 28 Jul 2025 15:48:05 +0530 Subject: [PATCH 1/2] added files --- new-repo1 | 1 + 1 file changed, 1 insertion(+) create mode 160000 new-repo1 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 From 6fb3c2fde24d0f95e1a613d9d737d7cc93b54f37 Mon Sep 17 00:00:00 2001 From: Nethmi Sansala Date: Mon, 28 Jul 2025 15:59:35 +0530 Subject: [PATCH 2/2] Update routes.py --- app/routes.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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