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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user