summaryrefslogtreecommitdiffhomepage
path: root/packages/console/core/src/account.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/console/core/src/account.ts')
-rw-r--r--packages/console/core/src/account.ts17
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(),
- )
- }
}