aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/api/healthcheck.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/api/healthcheck.go')
-rw-r--r--cmd/api/healthcheck.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/cmd/api/healthcheck.go b/cmd/api/healthcheck.go
index 625f4ca..4c0a8fa 100644
--- a/cmd/api/healthcheck.go
+++ b/cmd/api/healthcheck.go
@@ -5,12 +5,14 @@ import (
)
func (app *application) healthcheckHandler(w http.ResponseWriter, r *http.Request) {
- data := map[string]string{
- "status": "available",
- "environment": app.config.env,
- "version": version,
+ env := envelope{
+ "status": "available",
+ "system_info": map[string]string{
+ "environment": app.config.env,
+ "version": version,
+ },
}
- err := app.writeJSON(w, http.StatusOK, data, nil)
+ err := app.writeJSON(w, http.StatusOK, env, nil)
if err != nil {
app.logger.Debug("server error", "err", err)
http.Error(w, "The server encountered a problem and could not process your request", http.StatusInternalServerError)