pull/7432/head
Frank 2026-01-08 19:26:20 -05:00
parent 52fbd16e08
commit 790baec41f
1 changed files with 6 additions and 1 deletions

View File

@ -676,7 +676,12 @@ export async function handler(
ELSE ${cost}
END
`,
timeRollingUpdated: sql`now()`,
timeRollingUpdated: sql`
CASE
WHEN UNIX_TIMESTAMP(${SubscriptionTable.timeRollingUpdated}) >= UNIX_TIMESTAMP(now()) - ${rollingWindowSeconds} THEN ${SubscriptionTable.timeRollingUpdated}
ELSE now()
END
`,
})
.where(
and(