fix: 修复只有一个系统管理员用户组时打开个人信息报错的问题

This commit is contained in:
CaptainB 2022-06-10 10:55:07 +08:00 committed by f2c-ci-robot[bot]
parent d0d0943ff1
commit 3cfc2c7067
5 changed files with 8 additions and 8 deletions

View File

@ -3,6 +3,7 @@ package io.metersphere.controller;
import io.metersphere.base.domain.ServiceIntegration;
import io.metersphere.commons.constants.OperLogConstants;
import io.metersphere.commons.constants.OperLogModule;
import io.metersphere.commons.utils.SessionUtils;
import io.metersphere.controller.request.IntegrationRequest;
import io.metersphere.log.annotation.MsAuditLog;
import io.metersphere.service.IntegrationService;
@ -35,9 +36,9 @@ public class ServiceIntegrationController {
integrationService.delete(request);
}
@GetMapping("/all/{workspaceId}")
public List<ServiceIntegration> getAll(@PathVariable String workspaceId) {
return integrationService.getAll(workspaceId);
@GetMapping("/all")
public List<ServiceIntegration> getAll() {
return integrationService.getAll(SessionUtils.getCurrentWorkspaceId());
}
}

View File

@ -237,7 +237,7 @@ export default {
}
this.platformOptions = [];
this.platformOptions.push(...ISSUE_PLATFORM_OPTION);
this.result = this.$get("/service/integration/all/" + getCurrentUser().lastWorkspaceId, response => {
this.result = this.$get("/service/integration/all", response => {
let data = response.data;
let platforms = data.map(d => d.platform);
this.filterPlatformOptions(platforms, TAPD);

View File

@ -39,7 +39,7 @@
import TapdUserInfo from "@/business/components/settings/personal/TapdUserInfo";
import JiraUserInfo from "@/business/components/settings/personal/JiraUserInfo";
import AzureDevopsUserInfo from "@/business/components/settings/personal/AzureDevopsUserInfo";
import {getIntegrationService} from "@/network/organization";
import {getIntegrationService} from "@/network/workspace";
import { TokenKey } from "@/common/js/constants";
export default {

View File

@ -96,7 +96,7 @@ import MsTableOperatorButton from "../../common/components/MsTableOperatorButton
import {EMAIL_REGEX, PHONE_REGEX} from "@/common/js/regex";
import JiraUserInfo from "@/business/components/settings/personal/JiraUserInfo";
import TapdUserInfo from "@/business/components/settings/personal/TapdUserInfo";
import {getIntegrationService} from "@/network/organization";
import {getIntegrationService} from "@/network/workspace";
import ZentaoUserInfo from "@/business/components/settings/personal/ZentaoUserInfo";
import AzureDevopsUserInfo from "@/business/components/settings/personal/AzureDevopsUserInfo";
import {logout} from "@/network/user";

View File

@ -1,8 +1,7 @@
import {getCurrentWorkspaceId} from "@/common/js/utils";
import {get} from "@/common/js/ajax";
export function getIntegrationService(success) {
return get("/service/integration/all/" + getCurrentWorkspaceId(), response => {
return get("/service/integration/all", response => {
if (success) {
success(response.data);
}