summaryrefslogtreecommitdiffhomepage
path: root/packages/console/core/src/user.ts
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-11-06 13:03:02 -0500
committerDax Raad <[email protected]>2025-11-06 13:03:12 -0500
commit1ea3a8eb9beeb7d510fd29164ea741acec1ee04d (patch)
tree22c35a0003c6c2cfb998431f8e5180879cbab9d3 /packages/console/core/src/user.ts
parent8729edc5e059a9a29346044b016a6e05d9aca835 (diff)
downloadopencode-1ea3a8eb9beeb7d510fd29164ea741acec1ee04d.tar.gz
opencode-1ea3a8eb9beeb7d510fd29164ea741acec1ee04d.zip
big format
Diffstat (limited to 'packages/console/core/src/user.ts')
-rw-r--r--packages/console/core/src/user.ts28
1 files changed, 23 insertions, 5 deletions
diff --git a/packages/console/core/src/user.ts b/packages/console/core/src/user.ts
index 8b7a96f44..cbb1ac827 100644
--- a/packages/console/core/src/user.ts
+++ b/packages/console/core/src/user.ts
@@ -26,7 +26,10 @@ export namespace User {
authEmail: AuthTable.subject,
})
.from(UserTable)
- .leftJoin(AuthTable, and(eq(UserTable.accountID, AuthTable.accountID), eq(AuthTable.provider, "email")))
+ .leftJoin(
+ AuthTable,
+ and(eq(UserTable.accountID, AuthTable.accountID), eq(AuthTable.provider, "email")),
+ )
.where(and(eq(UserTable.workspaceID, Actor.workspace()), isNull(UserTable.timeDeleted))),
),
)
@@ -36,7 +39,13 @@ export namespace User {
tx
.select()
.from(UserTable)
- .where(and(eq(UserTable.workspaceID, Actor.workspace()), eq(UserTable.id, id), isNull(UserTable.timeDeleted)))
+ .where(
+ and(
+ eq(UserTable.workspaceID, Actor.workspace()),
+ eq(UserTable.id, id),
+ isNull(UserTable.timeDeleted),
+ ),
+ )
.then((rows) => rows[0]),
),
)
@@ -48,7 +57,10 @@ export namespace User {
email: AuthTable.subject,
})
.from(UserTable)
- .leftJoin(AuthTable, and(eq(UserTable.accountID, AuthTable.accountID), eq(AuthTable.provider, "email")))
+ .leftJoin(
+ AuthTable,
+ and(eq(UserTable.accountID, AuthTable.accountID), eq(AuthTable.provider, "email")),
+ )
.where(and(eq(UserTable.workspaceID, Actor.workspace()), eq(UserTable.id, id)))
.then((rows) => rows[0]?.email),
),
@@ -130,10 +142,16 @@ export namespace User {
workspaceName: WorkspaceTable.name,
})
.from(UserTable)
- .innerJoin(AuthTable, and(eq(UserTable.accountID, AuthTable.accountID), eq(AuthTable.provider, "email")))
+ .innerJoin(
+ AuthTable,
+ and(eq(UserTable.accountID, AuthTable.accountID), eq(AuthTable.provider, "email")),
+ )
.innerJoin(WorkspaceTable, eq(WorkspaceTable.id, workspaceID))
.where(
- and(eq(UserTable.workspaceID, workspaceID), eq(UserTable.id, Actor.assert("user").properties.userID)),
+ and(
+ eq(UserTable.workspaceID, workspaceID),
+ eq(UserTable.id, Actor.assert("user").properties.userID),
+ ),
)
.then((rows) => rows[0]),
)