Skip to content

Commit

Permalink
reserialize and serialize jsonconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyWolf13 committed Feb 22, 2024
1 parent 6da8e7c commit 076b1d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mixins/ConfigSaving.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
Expand Down

0 comments on commit 076b1d1

Please sign in to comment.