summaryrefslogtreecommitdiffhomepage
path: root/packages/console/core/script
diff options
context:
space:
mode:
authorFrank <[email protected]>2026-01-09 19:00:49 -0500
committerFrank <[email protected]>2026-01-09 19:00:51 -0500
commitb3e6b7a985972c385518b18f1283a9b90f43b2dd (patch)
treed46641beeeadd8c0fe2609e6edf2b44af941776e /packages/console/core/script
parent5c74bff8e13b2083a56404559072e1d422dd1760 (diff)
downloadopencode-b3e6b7a985972c385518b18f1283a9b90f43b2dd.tar.gz
opencode-b3e6b7a985972c385518b18f1283a9b90f43b2dd.zip
wip: black
Diffstat (limited to 'packages/console/core/script')
-rw-r--r--packages/console/core/script/lookup-user.ts13
1 files changed, 12 insertions, 1 deletions
diff --git a/packages/console/core/script/lookup-user.ts b/packages/console/core/script/lookup-user.ts
index 33a18ebfc..15cbe80f8 100644
--- a/packages/console/core/script/lookup-user.ts
+++ b/packages/console/core/script/lookup-user.ts
@@ -38,10 +38,21 @@ if (identifier.startsWith("wrk_")) {
workspaceID: UserTable.workspaceID,
workspaceName: WorkspaceTable.name,
role: UserTable.role,
+ subscribed: SubscriptionTable.timeCreated,
})
.from(UserTable)
.innerJoin(WorkspaceTable, eq(WorkspaceTable.id, UserTable.workspaceID))
- .where(eq(UserTable.accountID, accountID)),
+ .innerJoin(SubscriptionTable, eq(SubscriptionTable.userID, UserTable.id))
+ .where(eq(UserTable.accountID, accountID))
+ .then((rows) =>
+ rows.map((row) => ({
+ userID: row.userID,
+ workspaceID: row.workspaceID,
+ workspaceName: row.workspaceName,
+ role: row.role,
+ subscribed: formatDate(row.subscribed),
+ })),
+ ),
)
// Get all payments for these workspaces