mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-04 10:47:32 +00:00
store: type the retry test's expire for Postgres
This commit is contained in:
1 parent
6e92698e1e
commit
f127e373d6
1 file changed
+1
@@ -851,6 +851,7 @@ testRetryReleasedCode = withWorker $ \W {wCtx = ctx@Ctx {cStore}} -> do
|
||||
("revoked", \PrepaidCode {pcCodeHash} db -> void $ revokePrepaidCode db pcCodeHash orderTime, refusedWith 400 "code_invalid"),
|
||||
("expired", \PrepaidCode {pcCodeHash} db -> expire db pcCodeHash, refusedWith 409 "code_expired")
|
||||
]
|
||||
expire :: DB.Connection -> ByteString -> IO ()
|
||||
expire db codeHash = DB.execute db "UPDATE sx_badge_service_name_prepaid_codes SET expires_at = ? WHERE code_hash = ?" (orderTime, DB.Binary codeHash)
|
||||
forM_ (zip [1 :: Int ..] refusals) $ \(n, (what, change, refusal)) -> do
|
||||
(r, code) <- codeOrder n failedPhase >>= released
|
||||
|
||||
Reference in new issue
Block a user