From 97064df670d4d144384629b41891de33af6203d1 Mon Sep 17 00:00:00 2001 From: 2000-Trek Date: Fri, 9 Jun 2023 19:53:27 +0200 Subject: [PATCH] list and change --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index e2f3835..46822c8 100644 --- a/main.py +++ b/main.py @@ -33,7 +33,7 @@ def list(): users = c.fetchall() text = "" for i in users: - text = text + f'

{i[1]}: {i[2]}

Change balance:



' + text = text + f'

{i[1]}: {i[2]}

Change balance:



' return '
Search for User:


' + text @app.route("/list/user", methods=['GET']) @@ -69,7 +69,7 @@ def change(): try: change = int(request.args.get("change")) except ValueError: - return '

Pleas enter a number!

tags and user list' + return '

Please enter a number!

tags and user list' if change < 0: text = "removed from" change = change * -1 @@ -80,7 +80,7 @@ def change(): c.execute(f"UPDATE users SET balance = balance + {change} WHERE id={user_id}") 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} was {text} {user}

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