mirror of
https://github.com/bloomberg/goldpinger.git
synced 2026-05-06 08:46:53 +00:00
Fix of the healthz endpoint handler
According to #8. Signed-off-by: Ivan Kalita <kaduev13@gmail.com>
This commit is contained in:
@@ -75,9 +75,9 @@ func configureAPI(api *operations.GoldpingerAPI) http.Handler {
|
||||
goldpinger.CountCall("received", "healthz")
|
||||
healthResult := goldpinger.HealthCheck()
|
||||
if *healthResult.OK {
|
||||
return operations.NewHealthzServiceUnavailable().WithPayload(healthResult)
|
||||
} else {
|
||||
return operations.NewHealthzOK().WithPayload(healthResult)
|
||||
} else {
|
||||
return operations.NewHealthzServiceUnavailable().WithPayload(healthResult)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user