backups: make test config funcs return error
This commit is contained in:
@@ -403,9 +403,8 @@ async function setBackupConfig(backupConfig) {
|
||||
}
|
||||
}
|
||||
|
||||
const backupsTestConfigAsync = util.promisify(backups.testConfig);
|
||||
|
||||
await backupsTestConfigAsync(backupConfig);
|
||||
const error = await backups.testConfig(backupConfig);
|
||||
if (error) throw error;
|
||||
|
||||
if ('password' in backupConfig) { // user set password
|
||||
backupConfig.encryption = backups.generateEncryptionKeysSync(backupConfig.password);
|
||||
|
||||
Reference in New Issue
Block a user