(organizationId: string)
| 73 | * Returns the IDs of all workspaces attached to the organization. |
| 74 | */ |
| 75 | export async function getOrgWorkspaceIds(organizationId: string): Promise<string[]> { |
| 76 | const rows = await db |
| 77 | .select({ id: workspace.id }) |
| 78 | .from(workspace) |
| 79 | .where(eq(workspace.organizationId, organizationId)) |
| 80 | return rows.map((row) => row.id) |
| 81 | } |
| 82 | |
| 83 | export interface OrgScopeParams { |
| 84 | organizationId: string |
no test coverage detected