mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-29 13:09:46 +00:00
wip: black
This commit is contained in:
parent
794c5981a5
commit
b41fbda68f
2 changed files with 84 additions and 2 deletions
|
|
@ -41,8 +41,8 @@ if (identifier.startsWith("wrk_")) {
|
|||
subscribed: SubscriptionTable.timeCreated,
|
||||
})
|
||||
.from(UserTable)
|
||||
.innerJoin(WorkspaceTable, eq(WorkspaceTable.id, UserTable.workspaceID))
|
||||
.innerJoin(SubscriptionTable, eq(SubscriptionTable.userID, UserTable.id))
|
||||
.rightJoin(WorkspaceTable, eq(WorkspaceTable.id, UserTable.workspaceID))
|
||||
.leftJoin(SubscriptionTable, eq(SubscriptionTable.userID, UserTable.id))
|
||||
.where(eq(UserTable.accountID, accountID))
|
||||
.then((rows) =>
|
||||
rows.map((row) => ({
|
||||
|
|
@ -113,6 +113,8 @@ async function printWorkspace(workspaceID: string) {
|
|||
.select({
|
||||
balance: BillingTable.balance,
|
||||
customerID: BillingTable.customerID,
|
||||
subscriptionID: BillingTable.subscriptionID,
|
||||
subscriptionCouponID: BillingTable.subscriptionCouponID,
|
||||
})
|
||||
.from(BillingTable)
|
||||
.where(eq(BillingTable.workspaceID, workspace.id))
|
||||
|
|
@ -149,6 +151,7 @@ async function printWorkspace(workspaceID: string) {
|
|||
),
|
||||
)
|
||||
|
||||
/*
|
||||
await printTable("Usage", (tx) =>
|
||||
tx
|
||||
.select({
|
||||
|
|
@ -174,6 +177,7 @@ async function printWorkspace(workspaceID: string) {
|
|||
})),
|
||||
),
|
||||
)
|
||||
*/
|
||||
}
|
||||
|
||||
function formatMicroCents(value: number | null | undefined) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue