fix: correct API endpoints for repository listing
- Change frontend to call /repositories instead of /projects/repositories - Change parse-url endpoint to /repositories/parse-url - Fixes 422 error from route mismatch
This commit is contained in:
@@ -31,7 +31,7 @@ export interface URLParseResult {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function parseGitUrl(url: string): Promise<URLParseResult> {
|
export async function parseGitUrl(url: string): Promise<URLParseResult> {
|
||||||
const response = await apiClient.post("/projects/repositories/parse-url", { url });
|
const response = await apiClient.post("/repositories/parse-url", { url });
|
||||||
return response.data;
|
return response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ export async function listRepositories(projectId?: string): Promise<GitRepositor
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function listAllUserRepositories(): Promise<GitRepository[]> {
|
export async function listAllUserRepositories(): Promise<GitRepository[]> {
|
||||||
const response = await apiClient.get<GitRepository[]>("/projects/repositories");
|
const response = await apiClient.get<GitRepository[]>("/repositories");
|
||||||
return response.data;
|
return response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user