26 lines
427 B
Go
26 lines
427 B
Go
package routing
|
|
|
|
import (
|
|
lishwist "lishwist/core"
|
|
"lishwist/http/env"
|
|
"net/http"
|
|
|
|
"github.com/Teajey/rsvp"
|
|
)
|
|
|
|
type HealthProps struct {
|
|
GitVersion string
|
|
Config env.Config
|
|
}
|
|
|
|
func Health(app *lishwist.Session, h http.Header, r *http.Request) rsvp.Response {
|
|
if app.Admin() == nil {
|
|
return rsvp.Ok()
|
|
}
|
|
|
|
return rsvp.Response{Body: HealthProps{
|
|
GitVersion: env.GitVersion,
|
|
Config: env.Configuration,
|
|
}}
|
|
}
|