🔀 Merge pull request #1470 from CrazyWolf13/master

reserialize and serialize jsonconfig
Fixes #1361
This commit is contained in:
Alicia Sykes 2024-02-22 20:22:13 +00:00 committed by GitHub
commit 1f5274baca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -26,7 +26,9 @@ export default {
if (isSubPag) delete jsonConfig.appConfig;
// 2. Convert JSON into YAML
const yamlOptions = {};
const yaml = jsYaml.dump(jsonConfig, yamlOptions);
const strjsonConfig = JSON.stringify(jsonConfig);
const jsonObj = JSON.parse(strjsonConfig);
const yaml = jsYaml.dump(jsonObj, yamlOptions);
// 3. Prepare the request
const baseUrl = process.env.VUE_APP_DOMAIN || window.location.origin;
const endpoint = `${baseUrl}${serviceEndpoints.save}`;