diff --git a/framework/sdk-parent/frontend/src/api/user.js b/framework/sdk-parent/frontend/src/api/user.js index 77709a7415..18fe6cd51e 100644 --- a/framework/sdk-parent/frontend/src/api/user.js +++ b/framework/sdk-parent/frontend/src/api/user.js @@ -30,7 +30,7 @@ export function updatePassword(data) { } export function handleAuth(param) { - return post('issues/user/auth', param) + return post('/personal/relate/issues/user/auth', param); } export function getSystemTheme() { diff --git a/framework/sdk-parent/frontend/src/components/personal/PersonRouter.vue b/framework/sdk-parent/frontend/src/components/personal/PersonRouter.vue index cbf7785493..e0a63866f3 100644 --- a/framework/sdk-parent/frontend/src/components/personal/PersonRouter.vue +++ b/framework/sdk-parent/frontend/src/components/personal/PersonRouter.vue @@ -55,7 +55,7 @@ import JiraUserInfo from "./JiraUserInfo"; import AzureDevopsUserInfo from "./AzureDevopsUserInfo"; import {getIntegrationService} from "../../api/workspace"; import {useUserStore} from "@/store"; -import {getUserInfo, getWsAndPj} from "../../api/user"; +import {handleAuth as _handleAuth,getUserInfo, getWsAndPj} from "../../api/user"; const userStore = useUserStore(); @@ -142,9 +142,9 @@ export default { } param.workspaceId = getCurrentWorkspaceId(); param.platform = type; - this.$parent.result = this.$post("issues/user/auth", param, () => { + this.$parent.result = _handleAuth(param).then(() => { this.$success(this.$t('organization.integration.verified')); - }); + }) }, getPlatformInfo(row) { let orgId = getCurrentWorkspaceId(); diff --git a/framework/sdk-parent/frontend/src/components/personal/PersonSetting.vue b/framework/sdk-parent/frontend/src/components/personal/PersonSetting.vue index aaf92f8a10..93043899b8 100644 --- a/framework/sdk-parent/frontend/src/components/personal/PersonSetting.vue +++ b/framework/sdk-parent/frontend/src/components/personal/PersonSetting.vue @@ -100,7 +100,7 @@ import {getIntegrationService} from "../../api/workspace"; import ZentaoUserInfo from "./ZentaoUserInfo"; import AzureDevopsUserInfo from "./AzureDevopsUserInfo"; import {useUserStore} from "@/store"; -import {handleAuth, updateInfo, updatePassword} from "../../api/user"; +import {handleAuth as _handleAuth, updateInfo, updatePassword} from "../../api/user"; const userStore = useUserStore(); @@ -302,7 +302,7 @@ export default { let param = {...this.currentPlatformInfo}; param.workspaceId = getCurrentWorkspaceId(); param.platform = type; - this.$parent.result = handleAuth(param) + this.$parent.result = _handleAuth(param) .then(() => { this.$success(this.$t('organization.integration.verified')); }); diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BasePersonalRelateController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BasePersonalRelateController.java new file mode 100644 index 0000000000..25789ed4aa --- /dev/null +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BasePersonalRelateController.java @@ -0,0 +1,23 @@ +package io.metersphere.controller; + +import io.metersphere.commons.constants.MicroServiceName; +import io.metersphere.service.MicroService; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +@RestController +@RequestMapping("/personal/relate") +public class BasePersonalRelateController { + + @Resource + private MicroService microService; + + @PostMapping("/issues/user/auth") + public void userAuth(@RequestBody Object obj) { + microService.postForData(MicroServiceName.TEST_TRACK, "/issues/user/auth", obj); + } +}