mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-25 11:44:22 +01:00
wip: cloud
This commit is contained in:
@@ -42,12 +42,15 @@ const removeKey = action(async (id: string) => {
|
||||
const getBillingInfo = query(async () => {
|
||||
"use server"
|
||||
return withActor(async () => {
|
||||
const now = Date.now()
|
||||
const actor = Actor.assert("user")
|
||||
const user = await User.fromID(actor.properties.userID)
|
||||
const billing = await Billing.get()
|
||||
const payments = await Billing.payments()
|
||||
const usage = await Billing.usages()
|
||||
console.log({ user, billing, payments, usage })
|
||||
console.log("getBillingInfo", {
|
||||
duration: Date.now() - now,
|
||||
})
|
||||
return { user, billing, payments, usage }
|
||||
})
|
||||
}, "billingInfo")
|
||||
|
||||
Reference in New Issue
Block a user