/rest/errors should return an object (fixes #695)

This commit is contained in:
Jakob Borg
2014-09-18 12:49:59 +02:00
parent 5a1c885e8f
commit 37a473e7d6
3 changed files with 3 additions and 3 deletions

View File

@@ -430,7 +430,7 @@ func restGetSystem(w http.ResponseWriter, r *http.Request) {
func restGetErrors(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json; charset=utf-8")
guiErrorsMut.Lock()
json.NewEncoder(w).Encode(guiErrors)
json.NewEncoder(w).Encode(map[string][]guiError{"errors": guiErrors})
guiErrorsMut.Unlock()
}