REST API: simplify json response by removing result wrapper (BC) (#22299)

This commit is contained in:
andig 2025-08-01 15:00:14 +02:00 • committed by GitHub
parent db824ad42d
commit d541dfa4fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 423 additions and 293 deletions

View file

@ -39,7 +39,7 @@ func templatesHandler(w http.ResponseWriter, r *http.Request) {
return
}
jsonResult(w, res)
jsonWrite(w, res)
return
}
@ -56,7 +56,7 @@ func templatesHandler(w http.ResponseWriter, r *http.Request) {
res = append(res, t)
}
jsonResult(w, res)
jsonWrite(w, res)
}
// productsHandler returns the list of products by class
@ -101,5 +101,5 @@ func productsHandler(w http.ResponseWriter, r *http.Request) {
return strings.Compare(strings.ToLower(a.Name), strings.ToLower(b.Name))
})
jsonResult(w, res)
jsonWrite(w, res)
}