diff --git a/.vs/AACloudPlatform/v15/.suo b/.vs/AACloudPlatform/v15/.suo index d5f492f26..fcf526ea8 100644 Binary files a/.vs/AACloudPlatform/v15/.suo and b/.vs/AACloudPlatform/v15/.suo differ diff --git a/AACloudPlatform.njsproj b/AACloudPlatform.njsproj index 307afbf3e..cb8e6241a 100644 --- a/AACloudPlatform.njsproj +++ b/AACloudPlatform.njsproj @@ -13,7 +13,7 @@ 14.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) AACloudPlatform - Multi-Period-Daily + Multi-Period-Market C:\Program Files\nodejs\node.exe False diff --git a/Azure File Storage.js b/Azure File Storage.js index a1879faf9..a8db41c52 100644 --- a/Azure File Storage.js +++ b/Azure File Storage.js @@ -72,6 +72,13 @@ exports.newAzureFileStorage = function newAzureFileStorage(BOT) { function createFolder(folderPath, callBackFunction) { + if (fileService === undefined) { + + const logText = "[ERROR] initialize function not executed or failed. Can not process this request. Sorry."; + logger.write(logText); + return; + } + try { fileService.createDirectoryIfNotExists(shareName, folderPath, onFolderCreated); @@ -100,6 +107,13 @@ exports.newAzureFileStorage = function newAzureFileStorage(BOT) { function createTextFile(folderPath, fileName, fileContent, callBackFunction) { + if (fileService === undefined) { + + const logText = "[ERROR] initialize function not executed or failed. Can not process this request. Sorry."; + logger.write(logText); + return; + } + try { fileService.createFileFromText(shareName, folderPath, fileName, fileContent, onFileCreated); @@ -148,6 +162,13 @@ exports.newAzureFileStorage = function newAzureFileStorage(BOT) { function getTextFile(folderPath, fileName, callBackFunction, ignoreNotFound) { + if (fileService === undefined) { + + const logText = "[ERROR] initialize function not executed or failed. Can not process this request. Sorry."; + logger.write(logText); + return; + } + try { fileService.getFileToText(shareName, folderPath, fileName, undefined, onFileReceived); @@ -181,6 +202,13 @@ exports.newAzureFileStorage = function newAzureFileStorage(BOT) { function listFilesAndFolders(folderPath, callBackFunction) { + if (fileService === undefined) { + + const logText = "[ERROR] initialize function not executed or failed. Can not process this request. Sorry."; + logger.write(logText); + return; + } + try { let items = { diff --git a/Tom.azure.storage.connstring b/Tom.azure.storage.connstring new file mode 100644 index 000000000..94e460b0e --- /dev/null +++ b/Tom.azure.storage.connstring @@ -0,0 +1,7 @@ +{ +"useDevelopmentStorage": false, +"connectionString": "DefaultEndpointsProtocol=https;AccountName=aatestnet;AccountKey=rQRuD8KeD0upqcN9532zqZTknKwkYJDpGzkATGptk9lIEovkLchdOGOJVld26cUjpzTA4enxsxpCB33B0pOZRg==;EndpointSuffix=core.windows.net", +"accountName": "", +"accountKey": "", +"sas": "" +} \ No newline at end of file diff --git a/this.vm.config.json b/this.vm.config.json index 1156a9094..aa0ee668a 100644 --- a/this.vm.config.json +++ b/this.vm.config.json @@ -1,5 +1,5 @@ { "bot": { - "path": "../AAOlivia-Indicator-Bot" + "path": "../AATom-Indicator-Bot" } } \ No newline at end of file