Skip to content

Commit

Permalink
fix: 获取用户项目列表接口调用失败 TencentBlueKing#1800 (TencentBlueKing#1801)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaoxuwan authored Feb 28, 2024
1 parent cbd8d9d commit 76cb947
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class CIAuthService @Autowired constructor(private val devopsAuthConfig: DevopsA
return try {
val url = "${devopsAuthConfig.getBkciAuthServer()}/auth/api/open/service/auth/projects/users/$user"
val request = Request.Builder().url(url).header(DEVOPS_BK_TOKEN, devopsAuthConfig.getBkciAuthToken())
.header(DEVOPS_GATEWAY_TAG, DEVOPS_PROD_V3).header(DEVOPS_UID, user).get().build()
.header(DEVOPS_UID, user).get().build()
val apiResponse = HttpUtils.doRequest(okHttpClient, request, 2, allowHttpStatusSet)
val responseObject = objectMapper.readValue<BkciAuthListResponse>(apiResponse.content)
logger.debug("getProjectListByUser, requestUrl: [$url], result : [${apiResponse.content}]")
Expand All @@ -237,7 +237,5 @@ class CIAuthService @Autowired constructor(private val devopsAuthConfig: DevopsA
const val DEVOPS_BK_TOKEN = "X-DEVOPS-BK-TOKEN"
const val DEVOPS_UID = "X-DEVOPS-UID"
const val DEVOPS_PROJECT_ID = "X-DEVOPS-PROJECT-ID"
const val DEVOPS_GATEWAY_TAG = "x-gateway-tag"
const val DEVOPS_PROD_V3 = "prod-v3"
}
}

0 comments on commit 76cb947

Please sign in to comment.