Browse Source

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

Jakob Borg 11 years ago
parent
commit
37a473e7d6
3 changed files with 2 additions and 2 deletions
  1. 0 0
      auto/gui.files.go
  2. 1 1
      cmd/syncthing/gui.go
  3. 1 1
      gui/app.js

File diff suppressed because it is too large
+ 0 - 0
auto/gui.files.go


+ 1 - 1
cmd/syncthing/gui.go

@@ -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()
 }
 

+ 1 - 1
gui/app.js

@@ -356,7 +356,7 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http, $translate, $loca
 
     function refreshErrors() {
         $http.get(urlbase + '/errors').success(function (data) {
-            $scope.errors = data;
+            $scope.errors = data.errors;
             console.log("refreshErrors", data);
         });
     }

Some files were not shown because too many files changed in this diff