aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--merchant-lib/src/main/java/net/taler/merchantlib/MerchantApi.kt8
-rw-r--r--merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigManager.kt2
2 files changed, 3 insertions, 7 deletions
diff --git a/merchant-lib/src/main/java/net/taler/merchantlib/MerchantApi.kt b/merchant-lib/src/main/java/net/taler/merchantlib/MerchantApi.kt
index 656b093..3406f78 100644
--- a/merchant-lib/src/main/java/net/taler/merchantlib/MerchantApi.kt
+++ b/merchant-lib/src/main/java/net/taler/merchantlib/MerchantApi.kt
@@ -21,17 +21,13 @@ import io.ktor.client.engine.okhttp.OkHttp
import io.ktor.client.features.json.JsonFeature
import io.ktor.client.features.json.serializer.KotlinxSerializer
import io.ktor.client.request.get
-import io.ktor.client.request.header
-import io.ktor.http.HttpHeaders.Authorization
class MerchantApi(private val httpClient: HttpClient) {
constructor() : this(getDefaultHttpClient())
- suspend fun getConfig(baseUrl: String, apiKey: String = "sandbox"): ConfigResponse {
- return httpClient.get("$baseUrl/config") {
- header(Authorization, "ApiKey $apiKey")
- }
+ suspend fun getConfig(baseUrl: String): ConfigResponse {
+ return httpClient.get("$baseUrl/config")
}
}
diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigManager.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigManager.kt
index a7aff18..3f45e32 100644
--- a/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigManager.kt
+++ b/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigManager.kt
@@ -122,7 +122,7 @@ class ConfigManager(
}
scope.launch(Dispatchers.IO) {
- val configResponse = api.getConfig(merchantConfig.baseUrl, merchantConfig.apiKey)
+ val configResponse = api.getConfig(merchantConfig.baseUrl)
onMerchantConfigReceived(config, json, merchantConfig, configResponse)
}
}