diff --git a/main.py b/main.py index bbe57c0..7b85f72 100644 --- a/main.py +++ b/main.py @@ -70,18 +70,18 @@ def change(): change = int(request.args.get("change")) except ValueError: return '

Please enter a number!

tags and user list' + c.execute(f"UPDATE users SET balance = balance + {change} WHERE id={user_id}") + conn.commit() if change < 0: text = "removed from" - change = change * -1 + change_text = change * -1 elif change > 0: text = "added to" elif change == 0: return "

Nothing was done!

" - c.execute(f"UPDATE users SET balance = balance + {change} WHERE id={user_id}") - conn.commit() c.execute(f"SELECT * FROM users WHERE id={user_id}") user = c.fetchall()[0][1] - return f'

{change} was {text} {user}

back to the list' + return f'

{change_text} was {text} {user}

back to the list' @app.route("/addtag", methods=['GET']) def get_addtag_request():