REST API: simplify json response by removing result wrapper (BC) (#22299)
This commit is contained in:
parent
db824ad42d
commit
d541dfa4fa
28 changed files with 423 additions and 293 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue