move the code block down for readability
This commit is contained in:
@@ -111,33 +111,6 @@ async function onSubmit() {
|
||||
|
||||
const config = {}; // filled below
|
||||
|
||||
const data = {
|
||||
backupConfig: {
|
||||
provider: provider.value,
|
||||
config, // filled below
|
||||
format: format.value,
|
||||
},
|
||||
remotePath: remotePath.value,
|
||||
version: version ? version[1] : '',
|
||||
ipv4Config: {
|
||||
provider: ipv4Provider.value,
|
||||
ip: ipv4Address.value,
|
||||
ifname: ipv4Interface.value,
|
||||
},
|
||||
ipv6Config: {
|
||||
provider: ipv6Provider.value,
|
||||
ip: ipv6Address.value,
|
||||
ifname: ipv6Interface.value,
|
||||
},
|
||||
skipDnsSetup: skipDnsSetup.value,
|
||||
siteId: siteId.value
|
||||
};
|
||||
|
||||
if (encrypted.value) {
|
||||
data.backupConfig.encryptionPassword = encryptionPassword.value;
|
||||
data.backupConfig.encryptedFilenames = encryptedFilenames.value;
|
||||
}
|
||||
|
||||
if (s3like(provider.value)) {
|
||||
config.endpoint = providerConfig.value.endpoint;
|
||||
config.prefix = providerConfig.value.prefix;
|
||||
@@ -225,6 +198,33 @@ async function onSubmit() {
|
||||
config.credentials = providerConfig.value.credentials;
|
||||
}
|
||||
|
||||
const data = {
|
||||
backupConfig: {
|
||||
provider: provider.value,
|
||||
config,
|
||||
format: format.value,
|
||||
},
|
||||
remotePath: remotePath.value,
|
||||
version: version ? version[1] : '',
|
||||
ipv4Config: {
|
||||
provider: ipv4Provider.value,
|
||||
ip: ipv4Address.value,
|
||||
ifname: ipv4Interface.value,
|
||||
},
|
||||
ipv6Config: {
|
||||
provider: ipv6Provider.value,
|
||||
ip: ipv6Address.value,
|
||||
ifname: ipv6Interface.value,
|
||||
},
|
||||
skipDnsSetup: skipDnsSetup.value,
|
||||
siteId: siteId.value
|
||||
};
|
||||
|
||||
if (encrypted.value) {
|
||||
data.backupConfig.encryptionPassword = encryptionPassword.value;
|
||||
data.backupConfig.encryptedFilenames = encryptedFilenames.value;
|
||||
}
|
||||
|
||||
const [error] = await provisionModel.restore(data);
|
||||
if (error) {
|
||||
if (error.status === 424) {
|
||||
|
||||
Reference in New Issue
Block a user