Update __init__.py

This commit is contained in:
Arc 2020-01-29 14:40:06 +00:00 committed by GitHub
parent 60739a7587
commit b60af27038
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -598,8 +598,9 @@ def api_lnurlwithdraw(rand):
randar.remove(rand)
randstr = ','.join(randar)
# Update time
Faudb.execute("UPDATE withdraws SET tmestmp = ? AND rand = ? WHERE withdrawals = ?", (seconds , randstr, k1,))
# Update time and increments left
upinc = user_fau[0][10] - 1
Faudb.execute("UPDATE withdraws SET inc = ? SET tmestmp = ? AND rand = ? WHERE withdrawals = ?", (upinc, seconds, randstr, k1,))
header = {'Content-Type': 'application/json','Grpc-Metadata-macaroon':str(user_fau[0][4])}
@ -614,9 +615,6 @@ def api_lnurlwithdraw(rand):
with FauDatabase() as Faudb:
user_fau = Faudb.fetchall("SELECT * FROM withdraws WHERE withdrawals = ?", (k1,))
upinc = user_fau[0][10] - 1
Faudb.execute("UPDATE withdraws SET inc = ? WHERE withdrawals = ?", (upinc ,k1,))
return jsonify({"status":"OK"}), 200