Provider default contens for backup sites including all
This commit is contained in:
@@ -46,6 +46,7 @@ async function onSubmit() {
|
||||
|
||||
// build provider config
|
||||
const data = {};
|
||||
|
||||
if (s3like(provider.value)) {
|
||||
data.endpoint = providerConfig.value.endpoint;
|
||||
data.prefix = providerConfig.value.prefix;
|
||||
@@ -146,7 +147,11 @@ async function onSubmit() {
|
||||
|
||||
formError.value = {};
|
||||
busy.value = true;
|
||||
const [error, result] = await backupSitesModel.add(name.value, format.value, provider.value, data, schedulePattern, retention, limitsConfig);
|
||||
|
||||
// everything
|
||||
const contents = null;
|
||||
|
||||
const [error, result] = await backupSitesModel.add(name.value, format.value, contents, provider.value, data, schedulePattern, retention, limitsConfig);
|
||||
if (error) {
|
||||
formError.value.generic = error.body ? error.body.message : 'Internal error';
|
||||
busy.value = false;
|
||||
|
||||
@@ -20,8 +20,8 @@ function create() {
|
||||
if (error || result.status !== 200) return [error || result];
|
||||
return [null, result.body.backupSites];
|
||||
},
|
||||
async add(name, format, provider, config, schedule, retention, limits = null) {
|
||||
const data = { name, format, provider, config, schedule, retention };
|
||||
async add(name, format, contents, provider, config, schedule, retention, limits = null) {
|
||||
const data = { name, format, contents, provider, config, schedule, retention };
|
||||
|
||||
if (limits !== null) data.limits = limits;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user