From 96ed39616cd11b6b446e94b5649410024c8a5491 Mon Sep 17 00:00:00 2001 From: GlassOnTin Date: Sat, 16 Nov 2024 13:02:56 +0000 Subject: [PATCH] Remived duplicate POST config endpoint --- gecko_controller/web/app.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/gecko_controller/web/app.py b/gecko_controller/web/app.py index 098cf20..b92c9ab 100644 --- a/gecko_controller/web/app.py +++ b/gecko_controller/web/app.py @@ -297,18 +297,6 @@ def get_config(): """Get current configuration""" return jsonify(read_config()) -@app.route('/api/config', methods=['POST']) -def update_config(): - """Update configuration""" - try: - new_config = request.get_json() - write_config(new_config) - # Restart the gecko-controller service to apply changes - os.system('systemctl restart gecko-controller') - return jsonify({'status': 'success'}) - except Exception as e: - return jsonify({'status': 'error', 'message': str(e)}), 400 - @app.route('/api/logs') def get_logs(): """Get log data"""