Skip to content

Commit

Permalink
fix: parsing error in DefaultCouchDbClient
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwwinter committed Sep 6, 2024
1 parent 91feaa7 commit d30ec09
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import com.aamdigital.aambackendservice.error.InternalServerException
import com.aamdigital.aambackendservice.error.NotFoundException
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.node.ObjectNode
import com.fasterxml.jackson.module.kotlin.convertValue
import org.slf4j.LoggerFactory
import org.springframework.core.ParameterizedTypeReference
import org.springframework.core.io.buffer.DataBuffer
import org.springframework.http.HttpHeaders
import org.springframework.http.MediaType
Expand Down Expand Up @@ -38,7 +38,10 @@ class DefaultCouchDbClient(
.uri("/_all_dbs")
.accept(MediaType.APPLICATION_JSON)
.exchangeToMono { response ->
response.bodyToMono(object : ParameterizedTypeReference<List<String>>() {})
response.bodyToMono(String::class.java)
}
.map {
objectMapper.convertValue(it)
}
}

Expand Down

0 comments on commit d30ec09

Please sign in to comment.