diff options
| author | Frank <[email protected]> | 2026-01-10 13:57:47 -0500 |
|---|---|---|
| committer | Frank <[email protected]> | 2026-01-10 13:57:49 -0500 |
| commit | b41fbda68fe8abfd42be93cf63c78251c677d43c (patch) | |
| tree | 17de6e2d9b28425b0f528a21762be555e37b10bb /packages/console/core/script/lookup-user.ts | |
| parent | 794c5981a5ef898a07dc7ef420face09f0446a85 (diff) | |
| download | opencode-b41fbda68fe8abfd42be93cf63c78251c677d43c.tar.gz opencode-b41fbda68fe8abfd42be93cf63c78251c677d43c.zip | |
wip: black
Diffstat (limited to 'packages/console/core/script/lookup-user.ts')
| -rw-r--r-- | packages/console/core/script/lookup-user.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/console/core/script/lookup-user.ts b/packages/console/core/script/lookup-user.ts index 15cbe80f8..b06fb5654 100644 --- a/packages/console/core/script/lookup-user.ts +++ b/packages/console/core/script/lookup-user.ts @@ -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) { |
