wip: cloud

This commit is contained in:
Dax Raad
2025-09-02 03:14:56 -04:00
parent 47d4c87bdd
commit 810c9cff1d
33 changed files with 579 additions and 2197 deletions

View File

@@ -80,14 +80,12 @@ export namespace Billing {
cacheWriteTokens: input.cacheWriteTokens,
cost,
})
const [updated] = await tx
await tx
.update(BillingTable)
.set({
balance: sql`${BillingTable.balance} - ${cost}`,
})
.where(eq(BillingTable.workspaceID, workspaceID))
.returning()
return updated.balance
})
},
)