Add checkbox to configure backup site backup for update behavior
This commit is contained in:
@@ -20,8 +20,8 @@ function create() {
|
||||
if (error || result.status !== 200) return [error || result];
|
||||
return [null, result.body.backupSites];
|
||||
},
|
||||
async add(name, format, contents, provider, config, schedule, retention, limits = null) {
|
||||
const data = { name, format, contents, provider, config, schedule, retention };
|
||||
async add(name, format, contents, enableForUpdates, provider, config, schedule, retention, limits = null) {
|
||||
const data = { name, format, contents, enableForUpdates, provider, config, schedule, retention };
|
||||
|
||||
if (limits !== null) data.limits = limits;
|
||||
|
||||
@@ -69,10 +69,10 @@ function create() {
|
||||
if (error || result.status !== 202) return [error || result];
|
||||
return [null, result.body.taskId];
|
||||
},
|
||||
async setPrimary(id) {
|
||||
async setEnableForUpdates(id, enable) {
|
||||
let error, result;
|
||||
try {
|
||||
result = await fetcher.post(`${API_ORIGIN}/api/v1/backup_sites/${id}/configure/primary`, {}, { access_token: accessToken });
|
||||
result = await fetcher.post(`${API_ORIGIN}/api/v1/backup_sites/${id}/configure/enable_for_updates`, { enable }, { access_token: accessToken });
|
||||
} catch (e) {
|
||||
error = e;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user