fix(admin-web): redirect to created project using projectId not id

This commit is contained in:
2026-08-01 22:54:34 +08:00
parent cfe733554a
commit 97313aba0f
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -410,7 +410,7 @@ export const api = {
archiveFolder: (slug: string, folderId: string) =>
post(`${orgBase(slug)}/folders/${folderId}/archive`) as Promise<{ archived: true; folderId: string }>,
createProject: (slug: string, body: { name: string; folderId?: string }) =>
post(`${orgBase(slug)}/projects`, body) as Promise<{ id: string; name: string }>,
post(`${orgBase(slug)}/projects`, body) as Promise<{ projectId: string; folderId: string | null; workspaceDir: string; name: string }>,
project: (slug: string, projectId: string) => get(`${orgBase(slug)}/projects/${projectId}`) as Promise<ProjectDetail>,
renameProject: (slug: string, projectId: string, name: string) =>
patch(`${orgBase(slug)}/projects/${projectId}`, { name }),
@@ -88,7 +88,7 @@
projectName = '';
projectFolder = '';
showProjectModal = false;
window.location.href = `/admin/projects/${res.id}`;
window.location.href = `/admin/projects/${res.projectId}`;
} catch (err) {
toastError(err instanceof Error ? err.message : String(err));
}