chore: modernize go sources (#24896)

This commit is contained in:
andig 2025-10-31 16:25:53 +01:00 • committed by GitHub
parent 3421e8df81
commit 352012d24b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
324 changed files with 590 additions and 583 deletions

View file

@ -119,13 +119,13 @@ func updateSessionHandler(w http.ResponseWriter, r *http.Request) {
id := mux.Vars(r)["id"]
var data map[string]interface{}
var data map[string]any
if err := json.NewDecoder(r.Body).Decode(&data); err != nil {
jsonError(w, http.StatusBadRequest, errors.New("invalid JSON"))
return
}
updates := map[string]interface{}{}
updates := map[string]any{}
for _, field := range []string{"vehicle", "loadpoint"} {
if val, ok := data[field]; ok {
updates[field] = val