fix: add top-level GET /workspaces endpoint and derive project/repo from workspace data

- Add all_workspaces_router with GET /workspaces/ (no project/repo required)
- Include project_id in workspace responses
- Frontend: useWorkspaces() calls listAllWorkspaces when no args
- Frontend: WorkspacesPage uses top-level list, derives project/repo from workspace for mutations
- Fixes 422 from invalid UUID path params
This commit is contained in:
2026-06-01 00:20:19 +02:00
parent b05de96569
commit 59b125d8e2
6 changed files with 93 additions and 35 deletions
+5
View File
@@ -22,6 +22,11 @@ export async function listWorkspaces(
return response.data;
}
export async function listAllWorkspaces(): Promise<Workspace[]> {
const response = await apiClient.get<Workspace[]>("/workspaces/");
return response.data;
}
export async function createWorkspace(
projectId: string,
repoId: string,