From 4e2ced588a8965171a4df2e7210d5cf198f0ac7a Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 10 Jan 2021 15:25:29 +0100 Subject: [PATCH] fixes --- Client/httpInterface.js | 4 +++- .../Superalgos/Schemas/Docs-Concepts/vaina2.json | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 Projects/Superalgos/Schemas/Docs-Concepts/vaina2.json diff --git a/Client/httpInterface.js b/Client/httpInterface.js index cf410eb2a..43fb9fcff 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -446,7 +446,6 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE for (let i = 0; i < docsSchema.length; i++) { let schemaDocument = docsSchema[i] - let fileContent = JSON.stringify(schemaDocument, undefined, 4) let fileName = schemaDocument.type.toLowerCase() for (let j = 0; j < 10; j++) { fileName = cleanFileName(fileName) @@ -465,6 +464,9 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE } else { if (schemaDocument.edited === true || schemaDocument.created === true) { try { + schemaDocument.edited = undefined + schemaDocument.created = undefined + let fileContent = JSON.stringify(schemaDocument, undefined, 4) fs.writeFileSync(filePath + '/' + fileName, fileContent) console.log('[SUCCESS] ' + filePath + '/' + fileName + ' updated.') } catch (err) { diff --git a/Projects/Superalgos/Schemas/Docs-Concepts/vaina2.json b/Projects/Superalgos/Schemas/Docs-Concepts/vaina2.json new file mode 100644 index 000000000..287af2767 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Concepts/vaina2.json @@ -0,0 +1,13 @@ +{ + "created": true, + "type": "Vaina2", + "definition": { + "text": "Write here the summary / definition of this Concept." + }, + "paragraphs": [ + { + "style": "Text", + "text": "Left click and Edit to enter edit mode and change this text. ENTER to write new paragraphs. ESC to exit edit mode." + } + ] +} \ No newline at end of file