App Schema File Splitted into Individual Schema Documents Files

This commit is contained in:
Luis Fernando Molina committed 2021-04-20 15:31:23 +02:00
1 parent ee7cb0c835
commit 89bd9393a7
507 files changed
+24987 -25004

No files matched your search

+5 -19
View File
@@ -1496,27 +1496,13 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
function sendSchema(filePath, schemaType) {
let fs = require('fs')
if (schemaType === 'AppSchema') {
let fileName = 'AppSchema.json'
try {
filePath = filePath + fileName
fs.readFile(filePath, onFileRead)
} catch (e) {
console.log('[ERROR] Error reading the ' + fileName, e)
}
function onFileRead(err, schema) {
if (err) {
respondWithContent(undefined, httpResponse)
} else {
respondWithContent(schema, httpResponse)
}
}
} else {
try {
let folder = ''
switch (schemaType) {
case 'AppSchema': {
folder = 'App-Schema'
break
}
case 'DocsNodeSchema': {
folder = 'Docs-Nodes'
break
@@ -1560,7 +1546,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
}
respondWithContent("[]", httpResponse)
}
}
}
function sendStyleSheet(fileName) {