Fix usage of webadminStatus
This commit is contained in:
@@ -195,10 +195,10 @@ app.controller('RestoreController', ['$scope', '$http', 'Client', function ($sco
|
||||
$scope.busy = true;
|
||||
|
||||
Client.getStatus(function (error, status) {
|
||||
if (!error && !status.webadminStatus.restore.active) { // restore finished
|
||||
if (status.webadminStatus.restore.error) {
|
||||
if (!error && !status.restore.active) { // restore finished
|
||||
if (status.restore.errorMessage) {
|
||||
$scope.busy = false;
|
||||
$scope.error.generic = status.webadminStatus.restore.error;
|
||||
$scope.error.generic = status.restore.errorMessage;
|
||||
} else { // restore worked, redirect to admin page
|
||||
window.location.href = '/';
|
||||
}
|
||||
@@ -233,9 +233,9 @@ app.controller('RestoreController', ['$scope', '$http', 'Client', function ($sco
|
||||
return;
|
||||
}
|
||||
|
||||
if (status.webadminStatus.restore.active) return waitForRestore();
|
||||
if (status.restore.active) return waitForRestore();
|
||||
|
||||
if (status.webadminStatus.restore.error) $scope.error.generic = status.webadminStatus.restore.error;
|
||||
if (status.restore.errorMessage) $scope.error.generic = status.restore.errorMessage;
|
||||
|
||||
if (status.activated) {
|
||||
window.location.href = '/';
|
||||
|
||||
Reference in New Issue
Block a user