From a1c246e8bfb3c8c35512cbc80ff6d62f68a7978c Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 8 Jun 2021 04:46:32 +0200 Subject: [PATCH] http fix 3 --- Client/httpInterface.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Client/httpInterface.js b/Client/httpInterface.js index e8189b577..622b187cc 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -522,7 +522,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE fileName = schemaDocument.topic.toLowerCase() + '-' + pageNumber.substring(pageNumber.length - 3, pageNumber.length) + '-' + schemaDocument.type.toLowerCase() fileName = cleanFileName(fileName) - let extraDir = schemaDocument.type.split(' ')[0] + let extraDir = schemaDocument.topic.split(' ')[0] createNewDir(filePath + '/' + extraDir) extraFolder = extraDir + '/' + cleanFileName(schemaDocument.topic) newFilepath = filePath + '/' + extraFolder @@ -532,7 +532,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE fileName = schemaDocument.tutorial.toLowerCase() + '-' + pageNumber.substring(pageNumber.length - 3, pageNumber.length) + '-' + schemaDocument.type.toLowerCase() fileName = cleanFileName(fileName) - let extraDir = schemaDocument.type.split(' ')[0] + let extraDir = schemaDocument.tutorial.split(' ')[0] createNewDir(filePath + '/' + extraDir) extraFolder = extraDir + '/' + cleanFileName(schemaDocument.tutorial) newFilepath = filePath + '/' + extraFolder @@ -542,7 +542,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE fileName = schemaDocument.review.toLowerCase() + '-' + pageNumber.substring(pageNumber.length - 3, pageNumber.length) + '-' + schemaDocument.type.toLowerCase() fileName = cleanFileName(fileName) - let extraDir = schemaDocument.type.split(' ')[0] + let extraDir = schemaDocument.review.split(' ')[0] createNewDir(filePath + '/' + extraDir) extraFolder = extraDir + '/' + cleanFileName(schemaDocument.review) newFilepath = filePath + '/' + extraFolder @@ -561,8 +561,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE break } } - console.log(newFilepath) - continue + fileName = fileName + '.json' // if (schemaDocument.deleted === true) { try {