fix: add version field to /api/v1/server response
All checks were successful
check / check (push) Successful in 2m20s

Include globals.Version in the server info JSON response and update
README documentation to reflect the new field.
This commit is contained in:
clawbot
2026-03-09 17:22:48 -07:00
parent 946f208ac2
commit 6938e7ac59
2 changed files with 11 additions and 8 deletions

View File

@@ -2336,9 +2336,10 @@ func (hdlr *Handlers) HandleServerInfo() http.HandlerFunc {
}
hdlr.respondJSON(writer, request, map[string]any{
"name": hdlr.params.Config.ServerName,
"motd": hdlr.params.Config.MOTD,
"users": users,
"name": hdlr.params.Config.ServerName,
"version": hdlr.params.Globals.Version,
"motd": hdlr.params.Config.MOTD,
"users": users,
}, http.StatusOK)
}
}