From 05d6aef53cec7db1332aeeb4bc77c2ebe9e725e1 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Wed, 8 Apr 2020 19:10:30 +0800 Subject: [PATCH] bug fix --- .../io/metersphere/controller/WorkspaceController.java | 8 +++++++- .../components/settings/system/SystemWorkspace.vue | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/controller/WorkspaceController.java b/backend/src/main/java/io/metersphere/controller/WorkspaceController.java index 4277b4358d..6804200919 100644 --- a/backend/src/main/java/io/metersphere/controller/WorkspaceController.java +++ b/backend/src/main/java/io/metersphere/controller/WorkspaceController.java @@ -46,10 +46,16 @@ public class WorkspaceController { @PostMapping("special/update") @RequiresRoles(RoleConstants.ADMIN) - public void updateWorkspacebyAdmin(@RequestBody Workspace workspace) { + public void updateWorkspaceByAdmin(@RequestBody Workspace workspace) { workspaceService.updateWorkspacebyAdmin(workspace); } + @GetMapping("special/delete/{workspaceId}") + @RequiresRoles(RoleConstants.ADMIN) + public void deleteWorkspaceByAdmin(@PathVariable String workspaceId) { + workspaceService.deleteWorkspace(workspaceId); + } + @GetMapping("delete/{workspaceId}") @RequiresRoles(RoleConstants.ORG_ADMIN) public void deleteWorkspace(@PathVariable String workspaceId) { diff --git a/frontend/src/business/components/settings/system/SystemWorkspace.vue b/frontend/src/business/components/settings/system/SystemWorkspace.vue index 338724fa47..eb269dbf12 100644 --- a/frontend/src/business/components/settings/system/SystemWorkspace.vue +++ b/frontend/src/business/components/settings/system/SystemWorkspace.vue @@ -338,7 +338,7 @@ cancelButtonText: this.$t('commons.cancel'), type: 'warning' }).then(() => { - this.$get('/workspace/delete/' + row.id, () => { + this.$get('/workspace/special/delete/' + row.id, () => { Message.success(this.$t('commons.delete_success')); this.list(); });