From 8c0dab43a0ee342611e635e1275f6ffd9283f851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Fri, 9 Feb 2024 17:34:15 +0100 Subject: [PATCH] added app route for tube list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- server/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/app.py b/server/app.py index 0ef3081..a2e6c97 100644 --- a/server/app.py +++ b/server/app.py @@ -56,7 +56,8 @@ def register_tube_route(): return jsonify({'success': True, 'message': 'Tube registered successfully.'}) # Function to retrieve registered tubes from the database -def get_tubes(): +@app.route('/get_tube_list', methods=['GET']) +def get_tube_list(): cur = db.cursor() cur.execute("SELECT * FROM tubes") tubes = cur.fetchall()