Merge branch 'develop' of https://github.com/AdvancedAlgos/AAWeb into develop
This commit is contained in:
commit
e5b1489b0f
3 files changed
+15
-20
No files matched your search
@@ -5,39 +5,34 @@
|
||||
initialize: initialize
|
||||
}
|
||||
|
||||
let permissions;
|
||||
let connectionString;
|
||||
|
||||
return thisObject;
|
||||
|
||||
function initialize(callBackFunction) {
|
||||
function initialize(serverConfig, callBackFunction) {
|
||||
|
||||
readStoragePermissions();
|
||||
switch (serverConfig.environment) {
|
||||
|
||||
function readStoragePermissions() {
|
||||
|
||||
let filePath;
|
||||
|
||||
try {
|
||||
let fs = require('fs');
|
||||
filePath = './' + 'Storage' + '/' + 'Storage.Permissions.json';
|
||||
permissions = JSON.parse(fs.readFileSync(filePath, 'utf8'));
|
||||
|
||||
callBackFunction();
|
||||
case "Develop": {
|
||||
|
||||
connectionString = serverConfig.configAndPlugins.Develop.connectionString;
|
||||
break;
|
||||
}
|
||||
catch (err) {
|
||||
console.log("[ERROR] readStoragePermissions -> err = " + err.message);
|
||||
console.log("[HINT] readStoragePermissions -> You need to have a file at this path -> " + filePath);
|
||||
|
||||
callBackFunction();
|
||||
case "Production": {
|
||||
|
||||
connectionString = serverConfig.configAndPlugins.Production.connectionString;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
callBackFunction();
|
||||
}
|
||||
|
||||
function getPermission(pContainer, pType, pDays) {
|
||||
|
||||
let azure = require('azure-storage');
|
||||
let blobService = azure.createBlobService(permissions.connectionString);
|
||||
let blobService = azure.createBlobService(connectionString);
|
||||
|
||||
let startDate = new Date();
|
||||
startDate.setDate(startDate.getDate() - 1);
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
executingAt: 'Master App',
|
||||
visible: true,
|
||||
topMargin: 85,
|
||||
urlPrefix: 'https://charts-dev.advancedalgos.net/', /* 'http://localhost:1337/' */ /* 'https://charts-dev.advancedalgos.net/' */
|
||||
urlPrefix: 'http://localhost:1337/', /* 'http://localhost:1337/' */ /* 'https://charts-dev.advancedalgos.net/' */
|
||||
graphQL: {
|
||||
masterAppApiUrl: 'https://app-api.advancedalgos.net/graphql'
|
||||
},
|
||||
|
||||
@@ -135,7 +135,7 @@ function initialize() {
|
||||
const STORAGE_ACCESS_MANAGER = require('./Server/StorageAccessManager');
|
||||
storageAccessManager = STORAGE_ACCESS_MANAGER.newStorageAccessManager();
|
||||
|
||||
storageAccessManager.initialize(onInitialized);
|
||||
storageAccessManager.initialize(serverConfig, onInitialized);
|
||||
|
||||
function onInitialized() {
|
||||
|
||||
|
||||
Reference in new issue
Block a user