removed all print statments
This commit is contained in:
parent
66c0931ce6
commit
6f2504059e
1 changed files with 0 additions and 8 deletions
8
main.py
8
main.py
|
@ -123,30 +123,22 @@ def request_addtag(data):
|
||||||
def get_id():
|
def get_id():
|
||||||
global finished
|
global finished
|
||||||
tag_id = int(request.args.get("id"))
|
tag_id = int(request.args.get("id"))
|
||||||
print(tag_id)
|
|
||||||
c.execute(f"SELECT * FROM tags WHERE tagid ={tag_id}")
|
c.execute(f"SELECT * FROM tags WHERE tagid ={tag_id}")
|
||||||
tag_list = c.fetchall()
|
tag_list = c.fetchall()
|
||||||
print(tag_list)
|
print(tag_list)
|
||||||
if tag_list != []:
|
if tag_list != []:
|
||||||
tag = tag_list[0]
|
tag = tag_list[0]
|
||||||
print("aha")
|
|
||||||
print(users.qsize())
|
|
||||||
if users.qsize() == 0:
|
if users.qsize() == 0:
|
||||||
print("wants to change")
|
|
||||||
c.execute(f"UPDATE users SET balance = balance - 1 WHERE id={tag[1]}")
|
c.execute(f"UPDATE users SET balance = balance - 1 WHERE id={tag[1]}")
|
||||||
print("changed")
|
|
||||||
conn.commit()
|
conn.commit()
|
||||||
return make_response("True")
|
return make_response("True")
|
||||||
|
|
||||||
elif users.qsize() > 0:
|
elif users.qsize() > 0:
|
||||||
print("added")
|
|
||||||
user = users.get()
|
user = users.get()
|
||||||
c.execute(f"INSERT OR IGNORE INTO tags (tagid, userid) VALUES ({tag_id}, {user})")
|
c.execute(f"INSERT OR IGNORE INTO tags (tagid, userid) VALUES ({tag_id}, {user})")
|
||||||
conn.commit()
|
conn.commit()
|
||||||
finished = user
|
finished = user
|
||||||
return make_response("True")
|
return make_response("True")
|
||||||
else:
|
|
||||||
print("Error")
|
|
||||||
|
|
||||||
return make_response("False")
|
return make_response("False")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue