restore: setupToken must be set on the top level object

This commit is contained in:
Girish Ramakrishnan
2022-01-26 10:28:36 -08:00
parent 7a6a9cdbb4
commit b741cfbb21
2 changed files with 4 additions and 4 deletions

View File

@@ -198,7 +198,6 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien
var backupConfig = {
provider: $scope.provider,
format: $scope.format,
setupToken: $scope.setupToken
};
if ($scope.password) backupConfig.password = $scope.password;
@@ -323,7 +322,7 @@ app.controller('RestoreController', ['$scope', 'Client', function ($scope, Clien
sysinfoConfig.ifname = $scope.sysinfo.ifname;
}
Client.restore(backupConfig, $scope.backupId.replace(/\.tar\.gz(\.enc)?$/, ''), version ? version[1] : '', sysinfoConfig, $scope.skipDnsSetup, function (error) {
Client.restore(backupConfig, $scope.backupId.replace(/\.tar\.gz(\.enc)?$/, ''), version ? version[1] : '', sysinfoConfig, $scope.skipDnsSetup, $scope.setupToken, function (error) {
$scope.busy = false;
if (error) {