From fd5fd4d78c7a5bb8a30a65995ba058bca09b0844 Mon Sep 17 00:00:00 2001 From: bton Date: Fri, 16 Feb 2024 22:51:32 +0100 Subject: [PATCH] =?UTF-8?q?-1.5=E2=82=AC=20Button=20und=20preis=20var?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Website/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Website/__init__.py b/Website/__init__.py index d6deb4d..71b264c 100644 --- a/Website/__init__.py +++ b/Website/__init__.py @@ -6,7 +6,7 @@ from markupsafe import escape from .db import get_db from datetime import datetime finished = None - +preis = 1.5 #Ein Getraenk #flask_config DATABASE = './Website/mate.db' @@ -83,7 +83,7 @@ def create_app(test_config=None): users = c.fetchall() text = "" for i in users: - text = text + f'

{escape(i[1])}: {i[2]/100}€



' + text = text + f'

{escape(i[1])}: {i[2]/100}€



' return ''' @@ -350,7 +350,7 @@ def create_app(test_config=None): return make_response(json.dumps({"mode":"error","error":"043"})) - @app.route("/api/tag_id", methods=['GET', 'POST']) + @app.route("/api/tag_id", methods=['POST']) def get_id(): global finished global message @@ -410,7 +410,7 @@ def create_app(test_config=None): if user_list != []: balance_old = user_list[0][2] if user_queue.qsize() == 0: - c.execute(f"UPDATE users SET balance = balance - 150 WHERE id={tag[1]}") + c.execute(f"UPDATE users SET balance = balance - {preis*100} WHERE id={tag[1]}") db.commit() c.execute(f"SELECT * FROM users WHERE id={tag[1]}") user = c.fetchone()