init data with initial config and only mutate what we allow editing
This commit is contained in:
@@ -54,17 +54,12 @@ async function onSubmit() {
|
||||
return console.error(error);
|
||||
}
|
||||
|
||||
const data = {};
|
||||
const data = site.value.config;
|
||||
|
||||
// TODO maybe deal with gcs??
|
||||
if (s3like(provider.value)) {
|
||||
data.bucket = bucket.value;
|
||||
data.region = region.value;
|
||||
data.prefix = prefix.value;
|
||||
if (accessKeyId.value !== site.value.config.accessKeyId || secretAccessKey.value) {
|
||||
data.accessKeyId = accessKeyId.value;
|
||||
data.secretAccessKey = secretAccessKey.value;
|
||||
}
|
||||
data.accessKeyId = accessKeyId.value;
|
||||
if (secretAccessKey.value) data.secretAccessKey = secretAccessKey.value;
|
||||
}
|
||||
|
||||
if (provider.value === 'cifs') {
|
||||
|
||||
Reference in New Issue
Block a user