From 389e6ffcee9dac53e5432e71237c1089159915d5 Mon Sep 17 00:00:00 2001 From: bton Date: Fri, 23 Feb 2024 22:49:25 +0100 Subject: [PATCH] AHHHHH --- Website/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Website/__init__.py b/Website/__init__.py index 05ff891..722a152 100644 --- a/Website/__init__.py +++ b/Website/__init__.py @@ -141,14 +141,14 @@ def create_app(test_config=None): c = db.cursor() try: user_id = request.form["id"] - change = int(request.form["change"] * 100) + change = float(request.form["change"]) except: return render_template("error.html", error_code="095") c.execute(f"SELECT * FROM users WHERE id=?", [user_id]) users = c.fetchall() if users != []: balance_old = users[0][2] - c.execute(f"UPDATE users SET balance = balance + {change} WHERE id={user_id}") + c.execute(f"UPDATE users SET balance = balance + {change * 100} WHERE id={user_id}") db.commit() c.execute(f"SELECT * FROM users WHERE id={user_id}") user = c.fetchone()