Bug Fixed
This commit is contained in:
1 parent
2020a1b892
commit
aa0d7fe728
2 files changed
+23
-17
No files matched your search
+22
-16
@@ -333,7 +333,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
|
||||
let fileContent = JSON.stringify(schemaDocument, undefined, 4)
|
||||
let fileName = schemaDocument.type.toLowerCase()
|
||||
for (let j = 0; j < 10; j++) {
|
||||
fileName = fileName.replace(' ', '-')
|
||||
fileName = cleanFileName (fileName)
|
||||
}
|
||||
fileName = fileName + '.json'
|
||||
|
||||
@@ -385,9 +385,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
|
||||
let schemaDocument = docsSchema[i]
|
||||
let fileContent = JSON.stringify(schemaDocument, undefined, 4)
|
||||
let fileName = schemaDocument.type.toLowerCase()
|
||||
for (let j = 0; j < 10; j++) {
|
||||
fileName = fileName.replace(' ', '-')
|
||||
}
|
||||
fileName = cleanFileName (fileName)
|
||||
fileName = fileName + '.json'
|
||||
|
||||
fs.writeFileSync(filePath + '/' + fileName, fileContent)
|
||||
@@ -439,9 +437,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
|
||||
let fileContent = JSON.stringify(schemaDocument, undefined, 4)
|
||||
let pageNumber = '00' + schemaDocument.pageNumber
|
||||
let fileName = schemaDocument.topic.toLowerCase() + '-' + pageNumber.substring(pageNumber.length - 3, pageNumber.length) + '-' + schemaDocument.type.toLowerCase()
|
||||
for (let j = 0; j < 10; j++) {
|
||||
fileName = fileName.replace(' ', '-')
|
||||
}
|
||||
fileName = cleanFileName (fileName)
|
||||
fileName = fileName + '.json'
|
||||
|
||||
fs.writeFileSync(filePath + '/' + fileName, fileContent)
|
||||
@@ -493,9 +489,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
|
||||
let fileContent = JSON.stringify(schemaDocument, undefined, 4)
|
||||
let pageNumber = '00' + schemaDocument.pageNumber
|
||||
let fileName = schemaDocument.tutorial.toLowerCase() + '-' + pageNumber.substring(pageNumber.length - 3, pageNumber.length) + '-' + schemaDocument.type.toLowerCase()
|
||||
for (let j = 0; j < 10; j++) {
|
||||
fileName = fileName.replace(' ', '-')
|
||||
}
|
||||
fileName = cleanFileName (fileName)
|
||||
fileName = fileName + '.json'
|
||||
|
||||
fs.writeFileSync(filePath + '/' + fileName, fileContent)
|
||||
@@ -546,9 +540,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
|
||||
let schemaDocument = docsSchema[i]
|
||||
let fileContent = JSON.stringify(schemaDocument, undefined, 4)
|
||||
let fileName = schemaDocument.type.toLowerCase()
|
||||
for (let j = 0; j < 10; j++) {
|
||||
fileName = fileName.replace(' ', '-')
|
||||
}
|
||||
fileName = cleanFileName (fileName)
|
||||
fileName = fileName + '.json'
|
||||
|
||||
fs.writeFileSync(filePath + '/' + fileName, fileContent)
|
||||
@@ -572,7 +564,21 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
|
||||
break
|
||||
}
|
||||
}
|
||||
break
|
||||
function cleanFileName(fileName) {
|
||||
fileName = fileName
|
||||
.replaceAll(' ', '-')
|
||||
.replaceAll('---', '-')
|
||||
.replaceAll('?', '')
|
||||
.replaceAll('#', '')
|
||||
.replaceAll('$', '')
|
||||
.replaceAll('%', '')
|
||||
.replaceAll('^', '')
|
||||
.replaceAll('&', '')
|
||||
.replaceAll('*', '')
|
||||
.replaceAll('(', '')
|
||||
.replaceAll(')', '')
|
||||
return fileName
|
||||
}
|
||||
}
|
||||
break
|
||||
|
||||
@@ -630,8 +636,8 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE
|
||||
base,
|
||||
});
|
||||
} catch (err) {
|
||||
if (err.stack.indexOf('A pull request already exists') <0) {
|
||||
throw(err)
|
||||
if (err.stack.indexOf('A pull request already exists') < 0) {
|
||||
throw (err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ function newWorkspace() {
|
||||
executeAction({ name: 'Syncronize Tasks', project: 'Superalgos' })
|
||||
executeAction({ name: 'Syncronize Trading Sessions', project: 'Superalgos' })
|
||||
executeAction({ name: 'Syncronize Learning Sessions', project: 'Superalgos' })
|
||||
executeAction({ name: 'Play Tutorials', project: 'Superalgos' })
|
||||
//executeAction({ name: 'Play Tutorials', project: 'Superalgos' }) TODO reactivate this
|
||||
}
|
||||
|
||||
function setupEventsServerClients() {
|
||||
|
||||
Reference in new issue
Block a user