Skip to content

Commit

Permalink
infra(BE-121"): kover support
Browse files Browse the repository at this point in the history
 - fix build issue
  • Loading branch information
hanrw committed Nov 22, 2023
1 parent d090b3b commit 088ac34
Showing 1 changed file with 13 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,20 @@ internal class LemonSqueezyLicenseApi(
private val json = Json { ignoreUnknownKeys = true }

override suspend fun activeLicense(licenseKey: String, instanceName: String): LicenseActivationResult {
try {
val activationResult = requester.performRequest<String> {
method = HttpMethod.Post
url(path = "/v1/licenses/activate")
setBody(
LicenseActivationRequest(
licenseKey = licenseKey,
instanceName = instanceName,
)
val activationResult = requester.performRequest<String> {
method = HttpMethod.Post
url(path = "/v1/licenses/activate")
setBody(
LicenseActivationRequest(
licenseKey = licenseKey,
instanceName = instanceName,
)
}

return try {
json.decodeFromString<LicenseActivationSuccessResponse>(activationResult)
} catch (ex: Exception) {
Json.decodeFromString<LicenseActivationErrorResponse>(activationResult)
}
} catch (e: Exception) {
throw e
)
}
return try {
json.decodeFromString<LicenseActivationSuccessResponse>(activationResult)
} catch (ex: Exception) {
Json.decodeFromString<LicenseActivationErrorResponse>(activationResult)
}
}

Expand Down

0 comments on commit 088ac34

Please sign in to comment.