Skip to content

Commit

Permalink
change external controller
Browse files Browse the repository at this point in the history
  • Loading branch information
xcodeassociated committed Sep 17, 2024
1 parent 4dcdb13 commit 0ef1973
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ class ExternalController(
private val log = LogFactory.getLog(javaClass)

@GetMapping("/{id}")
fun getExternalResource(@PathVariable id: String): ResponseEntity<String> {
fun getExternalResource(@PathVariable id: String): ResponseEntity<SampleResponseDto> {
val data = externalServiceClient.fetchExternalResource(id)
log.info("External: Received $id, sending: ${data.toString()}")
return ResponseEntity.ok(data)
return ResponseEntity.ok(SampleResponseDto(data = data ?: "null"))
}
}
}

data class SampleResponseDto(val data: String)

0 comments on commit 0ef1973

Please sign in to comment.