diff --git a/src/main/scala/ai/diffy/ApiController.scala b/src/main/scala/ai/diffy/ApiController.scala index 02856f8..b18a6cc 100644 --- a/src/main/scala/ai/diffy/ApiController.scala +++ b/src/main/scala/ai/diffy/ApiController.scala @@ -160,9 +160,9 @@ class ApiController( @GetMapping(path = Array("/api/1/info")) def getInfo(): Map[String, _] = Map( "name" -> settings.serviceName, - "candidate" -> httpServiceToMap(s"${settings.candidateHost}:${settings.candidatePort}"), - "primary" -> httpServiceToMap(s"${settings.primaryHost}:${settings.primaryPort}"), - "secondary" -> httpServiceToMap(s"${settings.secondaryHost}:${settings.secondaryPort}"), + "candidate" -> httpServiceToMap(settings.candidate.toString), + "primary" -> httpServiceToMap(settings.primary.toString), + "secondary" -> httpServiceToMap(settings.secondary.toString), "relativeThreshold" -> settings.relativeThreshold, "absoluteThreshold" -> settings.absoluteThreshold, "protocol" -> "http", diff --git a/src/main/scala/ai/diffy/Settings.scala b/src/main/scala/ai/diffy/Settings.scala index 22f91bf..660bd56 100644 --- a/src/main/scala/ai/diffy/Settings.scala +++ b/src/main/scala/ai/diffy/Settings.scala @@ -54,5 +54,9 @@ object Downstream { } } sealed trait Downstream -case class HostPort(host: String, port: Int) extends Downstream -case class BaseUrl(baseUrl: String) extends Downstream \ No newline at end of file +case class HostPort(host: String, port: Int) extends Downstream{ + override def toString: String = s"${host}:${port}" +} +case class BaseUrl(baseUrl: String) extends Downstream { + override def toString: String = baseUrl +} \ No newline at end of file