From b41fbda68fe8abfd42be93cf63c78251c677d43c Mon Sep 17 00:00:00 2001 From: Frank Date: Sat, 10 Jan 2026 13:57:47 -0500 Subject: wip: black --- packages/console/core/script/lookup-user.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'packages/console/core/script/lookup-user.ts') 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) { -- cgit v1.2.3