put backblaze-b2 call inside path condition

merge-requests/30/head
Moe 2018-10-01 19:19:58 -07:00
parent aee4fec0e9
commit 637a62ee8f
2 changed files with 3 additions and 2 deletions

View File

@ -273,7 +273,6 @@ module.exports = function(s,config,lang){
var loadBackblazeB2ForUser = function(e){
var ar = JSON.parse(e.details);
try{
var B2 = require('backblaze-b2')
if(!s.group[e.ke].bb_b2 &&
ar.bb_b2_accountId &&
ar.bb_b2_accountId !=='' &&
@ -282,6 +281,7 @@ module.exports = function(s,config,lang){
ar.bb_b2_bucket &&
ar.bb_b2_bucket !== ''
){
var B2 = require('backblaze-b2')
if(!ar.bb_b2_dir || ar.bb_b2_dir === '/'){
ar.bb_b2_dir = ''
}
@ -321,7 +321,7 @@ module.exports = function(s,config,lang){
}).catch(backblazeErr)
}
}catch(err){
console.log(err)
s.debugLog(err)
}
}
var unloadBackblazeB2ForUser = function(user){

View File

@ -41,6 +41,7 @@
"http-proxy": "^1.17.0",
"webdav-fs": "^1.11.0",
"discord.js": "^11.3.2",
"backblaze-b2": "^1.0.4",
"ldapauth-fork": "^4.0.2"
},
"devDependencies": {}