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) {