make expire boost exclude unpaid invoices
This commit is contained in:
parent
9905e6eafe
commit
0e4b467b3c
@ -14,6 +14,7 @@ export async function expireBoost ({ data: { id }, models }) {
|
||||
FROM "ItemAct"
|
||||
WHERE act = 'BOOST'
|
||||
AND "itemId" = ${Number(id)}::INTEGER
|
||||
AND "invoiceActionState" IS NULL OR "invoiceActionState" = 'PAID'
|
||||
)
|
||||
UPDATE "Item"
|
||||
SET boost = COALESCE(boost.cur_msats, 0) / 1000, "oldBoost" = COALESCE(boost.old_msats, 0) / 1000
|
||||
|
Loading…
x
Reference in New Issue
Block a user