mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-02 11:58:28 +00:00
/rest/errors should return an object (fixes #695)
This commit is contained in:
parent
5a1c885e8f
commit
37a473e7d6
File diff suppressed because one or more lines are too long
@ -430,7 +430,7 @@ func restGetSystem(w http.ResponseWriter, r *http.Request) {
|
|||||||
func restGetErrors(w http.ResponseWriter, r *http.Request) {
|
func restGetErrors(w http.ResponseWriter, r *http.Request) {
|
||||||
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||||
guiErrorsMut.Lock()
|
guiErrorsMut.Lock()
|
||||||
json.NewEncoder(w).Encode(guiErrors)
|
json.NewEncoder(w).Encode(map[string][]guiError{"errors": guiErrors})
|
||||||
guiErrorsMut.Unlock()
|
guiErrorsMut.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -356,7 +356,7 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http, $translate, $loca
|
|||||||
|
|
||||||
function refreshErrors() {
|
function refreshErrors() {
|
||||||
$http.get(urlbase + '/errors').success(function (data) {
|
$http.get(urlbase + '/errors').success(function (data) {
|
||||||
$scope.errors = data;
|
$scope.errors = data.errors;
|
||||||
console.log("refreshErrors", data);
|
console.log("refreshErrors", data);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user