diff --git a/src/Python/flask/web/app.py b/src/Python/flask/web/app.py index 41c2cba..9cd919e 100644 --- a/src/Python/flask/web/app.py +++ b/src/Python/flask/web/app.py @@ -77,11 +77,12 @@ def move(): db_connection = get_db() cursor = db_connection.cursor() sql_command = "INSERT INTO command (command) VALUES (%s)" - cursor.execute(sql_command, (direction,)) + cursor.execute(sql_command, (direction,)) + db_connection.commit() cursor.close() db_connection.close() - + print(f"check: {data}") return jsonify({"status": "success", "direction": direction}) @app.route("/database")