diff options
| author | Frank <[email protected]> | 2025-10-06 16:15:10 -0400 |
|---|---|---|
| committer | Frank <[email protected]> | 2025-10-06 17:13:19 -0400 |
| commit | 9e8fd16e6e4154ae0bccff8342e4b0c7780d8db8 (patch) | |
| tree | c9f936bfcaf7cf7f275334e869738c87989a2362 /packages/console/core/src/account.ts | |
| parent | 1b17d8070bcddeddaea3dea403f031a161539901 (diff) | |
| download | opencode-9e8fd16e6e4154ae0bccff8342e4b0c7780d8db8.tar.gz opencode-9e8fd16e6e4154ae0bccff8342e4b0c7780d8db8.zip | |
wip: zen
Diffstat (limited to 'packages/console/core/src/account.ts')
| -rw-r--r-- | packages/console/core/src/account.ts | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/packages/console/core/src/account.ts b/packages/console/core/src/account.ts index cd1eed4b1..f246c8e1a 100644 --- a/packages/console/core/src/account.ts +++ b/packages/console/core/src/account.ts @@ -1,12 +1,9 @@ import { z } from "zod" -import { and, eq, getTableColumns, isNull } from "drizzle-orm" +import { eq } from "drizzle-orm" import { fn } from "./util/fn" import { Database } from "./drizzle" import { Identifier } from "./identifier" import { AccountTable } from "./schema/account.sql" -import { Actor } from "./actor" -import { WorkspaceTable } from "./schema/workspace.sql" -import { UserTable } from "./schema/user.sql" export namespace Account { export const create = fn( @@ -46,16 +43,4 @@ export namespace Account { .then((rows) => rows[0]) }), ) - - export const workspaces = async () => { - const actor = Actor.assert("account") - return Database.transaction(async (tx) => - tx - .select(getTableColumns(WorkspaceTable)) - .from(WorkspaceTable) - .innerJoin(UserTable, eq(UserTable.workspaceID, WorkspaceTable.id)) - .where(and(eq(UserTable.accountID, actor.properties.accountID), isNull(WorkspaceTable.timeDeleted))) - .execute(), - ) - } } |
