wip: cloud

This commit is contained in:
Dax Raad 2025-09-02 03:14:56 -04:00
commit 810c9cff1d
33 changed files with 575 additions and 2193 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
})
},
)