This commit is contained in:
Luis Fernando Molina committed 2021-01-10 15:25:29 +01:00
1 parent a704ee7c96
commit 4e2ced588a
2 files changed
+16 -1

No files matched your search

+3 -1
View File
@@ -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) {
@@ -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."
}
]
}