From 0d9e36046856a7c532e159983521a9665b00988e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Tue, 28 Jun 2022 18:07:59 +0200 Subject: [PATCH] remived gui MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- main.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 01ae99a..c6eaa25 100644 --- a/main.py +++ b/main.py @@ -58,7 +58,10 @@ def setColor(strip, color, wait_ms=10): if __name__ == '__main__': app = Flask(__name__) - @app.route('/') + + #api + + @app.route('/api/') def index(): return ''' @@ -106,7 +109,7 @@ if __name__ == '__main__': ''' - @app.route('/mode', methods=['GET']) + @app.route('/api/mode', methods=['GET']) def mode(): global mode global r @@ -133,7 +136,7 @@ if __name__ == '__main__': mode = 1 return 'Color: '+str(r)+','+str(g)+','+str(b) - @app.route('/power', methods=['GET']) + @app.route('/api/power', methods=['GET']) def power(): global power power = request.args.get('power')