wip: cloud
This commit is contained in:
parent
721869353b
commit
9c16db0f36
1 changed files with 4 additions and 1 deletions
|
|
@ -42,12 +42,15 @@ const removeKey = action(async (id: string) => {
|
||||||
const getBillingInfo = query(async () => {
|
const getBillingInfo = query(async () => {
|
||||||
"use server"
|
"use server"
|
||||||
return withActor(async () => {
|
return withActor(async () => {
|
||||||
|
const now = Date.now()
|
||||||
const actor = Actor.assert("user")
|
const actor = Actor.assert("user")
|
||||||
const user = await User.fromID(actor.properties.userID)
|
const user = await User.fromID(actor.properties.userID)
|
||||||
const billing = await Billing.get()
|
const billing = await Billing.get()
|
||||||
const payments = await Billing.payments()
|
const payments = await Billing.payments()
|
||||||
const usage = await Billing.usages()
|
const usage = await Billing.usages()
|
||||||
console.log({ user, billing, payments, usage })
|
console.log("getBillingInfo", {
|
||||||
|
duration: Date.now() - now,
|
||||||
|
})
|
||||||
return { user, billing, payments, usage }
|
return { user, billing, payments, usage }
|
||||||
})
|
})
|
||||||
}, "billingInfo")
|
}, "billingInfo")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue