reenable kotlin client tests in shippable ci (#3751)

This commit is contained in:
William Cheng
2019-08-25 00:53:11 +08:00
committed by GitHub
parent 1f5aa22f5c
commit 0beb8caa85
3 changed files with 14 additions and 10 deletions

View File

@@ -74,10 +74,12 @@ open class ApiClient(val baseUrl: String) {
protected fun updateAuthParams(requestConfig: RequestConfig) {
if (requestConfig.headers["api_key"].isNullOrEmpty()) {
if (apiKeyPrefix["api_key"] != null) {
requestConfig.headers["api_key"] = apiKeyPrefix["api_key"] + " " + apiKey["api_key"]
} else {
requestConfig.headers["api_key"] = apiKey["api_key"]
if (apiKey["api_key"] != null) {
if (apiKeyPrefix["api_key"] != null) {
requestConfig.headers["api_key"] = apiKeyPrefix["api_key"]!! + " " + apiKey["api_key"]!!
} else {
requestConfig.headers["api_key"] = apiKey["api_key"]!!
}
}
}
if (requestConfig.headers[Authorization].isNullOrEmpty()) {