added app route for tube list

Signed-off-by: Ebbe Baß <ebbe.bass>
main
Ebbe Baß 2024-02-09 17:34:15 +01:00
parent 8af8f55135
commit 8c0dab43a0
1 changed files with 2 additions and 1 deletions

View File

@ -56,7 +56,8 @@ def register_tube_route():
return jsonify({'success': True, 'message': 'Tube registered successfully.'}) return jsonify({'success': True, 'message': 'Tube registered successfully.'})
# Function to retrieve registered tubes from the database # 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 = db.cursor()
cur.execute("SELECT * FROM tubes") cur.execute("SELECT * FROM tubes")
tubes = cur.fetchall() tubes = cur.fetchall()