fix: add version field to /api/v1/server response
All checks were successful
check / check (push) Successful in 2m20s
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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user