summaryrefslogtreecommitdiffhomepage
path: root/packages/console/core/src/user.ts
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-11-08 20:21:02 -0500
committerDax Raad <[email protected]>2025-11-08 20:21:02 -0500
commit4d20e1c3c6207cf6731ad8db9f92caf4ef31cb99 (patch)
tree1c0b14810b8919e0d9dba022384da876717f8e2e /packages/console/core/src/user.ts
parent4bb7ea91271e85621a1394c70867ddc26be45631 (diff)
parent969af4d54122b727d7251b2977f617424d08e4cb (diff)
downloadopencode-4d20e1c3c6207cf6731ad8db9f92caf4ef31cb99.tar.gz
opencode-4d20e1c3c6207cf6731ad8db9f92caf4ef31cb99.zip
Merge remote-tracking branch 'origin/dev' into dev
Diffstat (limited to 'packages/console/core/src/user.ts')
-rw-r--r--packages/console/core/src/user.ts28
1 files changed, 5 insertions, 23 deletions
diff --git a/packages/console/core/src/user.ts b/packages/console/core/src/user.ts
index cbb1ac827..8b7a96f44 100644
--- a/packages/console/core/src/user.ts
+++ b/packages/console/core/src/user.ts
@@ -26,10 +26,7 @@ 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))),
),
)
@@ -39,13 +36,7 @@ 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]),
),
)
@@ -57,10 +48,7 @@ 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),
),
@@ -142,16 +130,10 @@ 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]),
)