diff --git a/web-app/packages/admin-app/vite.config.ts b/web-app/packages/admin-app/vite.config.ts index 7b496221..0ae15f09 100644 --- a/web-app/packages/admin-app/vite.config.ts +++ b/web-app/packages/admin-app/vite.config.ts @@ -67,6 +67,9 @@ export default defineConfig(({ mode }) => ({ '/v1': { target: `http://127.0.0.1:${serverPort}` }, + '/v2': { + target: `http://127.0.0.1:${serverPort}` + }, '/app': { target: `http://127.0.0.1:${serverPort}` }, diff --git a/web-app/packages/app/vite.config.ts b/web-app/packages/app/vite.config.ts index 2efb7097..fcbe14e0 100644 --- a/web-app/packages/app/vite.config.ts +++ b/web-app/packages/app/vite.config.ts @@ -67,6 +67,9 @@ export default defineConfig(({ mode }) => ({ '/v1': { target: `http://127.0.0.1:${serverPort}` }, + '/v2': { + target: `http://127.0.0.1:${serverPort}` + }, '/app': { target: `http://127.0.0.1:${serverPort}` }, diff --git a/web-app/packages/lib/src/modules/project/projectApi.ts b/web-app/packages/lib/src/modules/project/projectApi.ts index 51334697..6fe2a359 100644 --- a/web-app/packages/lib/src/modules/project/projectApi.ts +++ b/web-app/packages/lib/src/modules/project/projectApi.ts @@ -24,7 +24,6 @@ import { UpdateProjectAccessParams } from '@/modules/project/types' - export const ProjectApi = { async fetchProject( namespace: string, @@ -59,16 +58,12 @@ export const ProjectApi = { }, async deleteProject( - namespace: string, - projectName: string, + id: string, withRetry?: boolean ): Promise> { - return ProjectModule.httpService.delete( - `/v1/project/${namespace ? `${namespace}/${projectName}` : projectName}`, - { - ...(withRetry ? getDefaultRetryOptions() : {}) - } - ) + return ProjectModule.httpService.post(`/v2/projects/${id}/scheduleDelete`, { + ...(withRetry ? getDefaultRetryOptions() : {}) + }) }, async unsubscribeProject(id: string): Promise> { diff --git a/web-app/packages/lib/src/modules/project/store.ts b/web-app/packages/lib/src/modules/project/store.ts index 4dd23976..00ba131a 100644 --- a/web-app/packages/lib/src/modules/project/store.ts +++ b/web-app/packages/lib/src/modules/project/store.ts @@ -31,7 +31,8 @@ import { ProjectAccessRequest, GetUserAccessRequestsPayload, GetProjectAccessRequestsPayload, - DownloadPayload + DownloadPayload, + DeleteProjectPayload } from '@/modules/project/types' import { useUserStore } from '@/modules/user/store' @@ -266,17 +267,13 @@ export const useProjectStore = defineStore('projectModule', { } }, - async deleteProject(payload) { + async deleteProject(payload: DeleteProjectPayload) { const notificationStore = useNotificationStore() const userStore = useUserStore() try { waitCursor(true) - await ProjectApi.deleteProject( - payload.namespace, - payload.projectName, - true - ) + await ProjectApi.deleteProject(payload.projectId, true) this.setProject({ project: null }) await userStore.fetchUserProfile() waitCursor(false) diff --git a/web-app/packages/lib/src/modules/project/types.ts b/web-app/packages/lib/src/modules/project/types.ts index aa87c3e7..cdb22a7e 100644 --- a/web-app/packages/lib/src/modules/project/types.ts +++ b/web-app/packages/lib/src/modules/project/types.ts @@ -307,3 +307,7 @@ export interface TableDataHeader { sortable?: boolean width?: number } + +export interface DeleteProjectPayload { + projectId: string +} diff --git a/web-app/packages/lib/src/modules/project/views/ProjectSettingsViewTemplate.vue b/web-app/packages/lib/src/modules/project/views/ProjectSettingsViewTemplate.vue index b1bbb014..e56afbcb 100644 --- a/web-app/packages/lib/src/modules/project/views/ProjectSettingsViewTemplate.vue +++ b/web-app/packages/lib/src/modules/project/views/ProjectSettingsViewTemplate.vue @@ -188,8 +188,7 @@ export default defineComponent({ }, onDeleteProject() { this.deleteProject({ - namespace: this.namespace, - projectName: this.projectName + projectId: this.project.id }) } }