ImportHandler: flatten code

No functional changes
pull/3509/head
muxator 2018-10-31 22:55:58 +01:00
parent e8558e3497
commit 6727a77073
1 changed files with 7 additions and 7 deletions

View File

@ -141,14 +141,14 @@ exports.doImport = function(req, res, padId)
if(headCount >= 10){
apiLogger.warn("Direct database Import attempt of a pad that already has content, we wont be doing this")
return callback("padHasData");
}else{
fs.readFile(srcFile, "utf8", function(err, _text){
directDatabaseAccess = true;
importEtherpad.setPadRaw(padId, _text, function(err){
callback();
});
}
fs.readFile(srcFile, "utf8", function(err, _text){
directDatabaseAccess = true;
importEtherpad.setPadRaw(padId, _text, function(err){
callback();
});
}
});
});
}else{
callback();