ImportHandler: Drop unnecessary underscores in variable names
Also delete an unnecessary comment.pull/5423/head
parent
2512593d4b
commit
c8f2409de0
|
@ -139,18 +139,15 @@ const doImport = async (req, res, padId) => {
|
||||||
|
|
||||||
let directDatabaseAccess = false;
|
let directDatabaseAccess = false;
|
||||||
if (fileIsEtherpad) {
|
if (fileIsEtherpad) {
|
||||||
// we do this here so we can see if the pad has quite a few edits
|
const pad = await padManager.getPad(padId);
|
||||||
const _pad = await padManager.getPad(padId);
|
const headCount = pad.head;
|
||||||
const headCount = _pad.head;
|
|
||||||
|
|
||||||
if (headCount >= 10) {
|
if (headCount >= 10) {
|
||||||
logger.warn('Aborting direct database import attempt of a pad that already has content');
|
logger.warn('Aborting direct database import attempt of a pad that already has content');
|
||||||
throw new ImportError('padHasData');
|
throw new ImportError('padHasData');
|
||||||
}
|
}
|
||||||
|
const text = await fs.readFile(srcFile, 'utf8');
|
||||||
const _text = await fs.readFile(srcFile, 'utf8');
|
|
||||||
directDatabaseAccess = true;
|
directDatabaseAccess = true;
|
||||||
await importEtherpad.setPadRaw(padId, _text);
|
await importEtherpad.setPadRaw(padId, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
// convert file to html if necessary
|
// convert file to html if necessary
|
||||||
|
|
Loading…
Reference in New Issue