fix: add version field to /api/v1/server response (#62)
check / check (push) Successful in 4s

Add `version` field from `globals.Version` to the `handleServerInfo` response and update README documentation to include the new field.

Closes sneak/chat#43

<!-- session: agent:sdlc-manager:subagent:35f84819-55dd-4bb6-a94b-8103777cc433 -->

Co-authored-by: clawbot <clawbot@noreply.git.eeqj.de>
Reviewed-on: sneak/chat#62
Co-authored-by: clawbot <clawbot@noreply.example.org>
Co-committed-by: clawbot <clawbot@noreply.example.org>
Cette révision a été fusionnée dans la demande d’ajout #62.
Cette révision appartient à :
2026-03-10 11:05:10 +01:00
révisé par sneak
co-authored by clawbot
Parent 946f208ac2
révision 687c958bd1
2 fichiers modifiés avec 11 ajouts et 8 suppressions
+4 -3
Voir le fichier
@@ -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)
}
}