This commit is contained in:
2000-Trek 2023-06-16 19:16:53 +02:00
parent 25d4ed2b71
commit 2050cc5a5c

View file

@ -112,7 +112,7 @@ def remove_user():
@app.route("/adduser/user", methods=['GET'])
def adduser():
user = request.args.get("username")
c.execute("SELECT * FROM users WHERE username=%(user)s", {'user': user})
c.execute("SELECT * FROM users WHERE username='%s'", user)
if c.fetchall() == []:
c.execute("INSERT or IGNORE INTO users (username, balance) VALUES (%(user)s, 0)", {'user': user})
conn.commit()