aboutsummaryrefslogtreecommitdiffstats
path: root/lib/db.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-10-31 17:20:07 -0700
committerAdam Soltys <[email protected]>2024-10-31 17:20:07 -0700
commitcb808e7720a720dd46c37372ba90f8f1aadd876c (patch)
treeb924c6d2c8a398bbbc1963a1872d82d2e7a055c1 /lib/db.ts
parentdfaf0dbbe00c83dd4e3c99292248b1731f06bf6d (diff)
downloadcoinos-server-cb808e7720a720dd46c37372ba90f8f1aadd876c.tar.gz
coinos-server-cb808e7720a720dd46c37372ba90f8f1aadd876c.zip
add to pending after debit
Diffstat (limited to 'lib/db.ts')
-rw-r--r--lib/db.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/db.ts b/lib/db.ts
index 2bff5e97..13c06344 100644
--- a/lib/db.ts
+++ b/lib/db.ts
@@ -37,6 +37,7 @@ local pid = KEYS[6]
local total = tonumber(ARGV[1])
local credit = tonumber(ARGV[2])
+local hash = ARGV[3]
local payment = redis.call('get', paymentKey)
@@ -46,6 +47,7 @@ if payment ~= nil then
redis.call('del', paymentKey)
redis.call('del', hashKey)
redis.call('lrem', paymentsKey, 0, pid);
+ redis.call('srem', 'pending', hash);
end
return pid