mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
ImportHandler: Drop unnecessary underscores in variable names
Also delete an unnecessary comment.
This commit is contained in:
parent
2512593d4b
commit
c8f2409de0
1 changed files with 4 additions and 7 deletions
|
@ -139,18 +139,15 @@ const doImport = async (req, res, padId) => {
|
|||
|
||||
let directDatabaseAccess = false;
|
||||
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 headCount = _pad.head;
|
||||
|
||||
const pad = await padManager.getPad(padId);
|
||||
const headCount = pad.head;
|
||||
if (headCount >= 10) {
|
||||
logger.warn('Aborting direct database import attempt of a pad that already has content');
|
||||
throw new ImportError('padHasData');
|
||||
}
|
||||
|
||||
const _text = await fs.readFile(srcFile, 'utf8');
|
||||
const text = await fs.readFile(srcFile, 'utf8');
|
||||
directDatabaseAccess = true;
|
||||
await importEtherpad.setPadRaw(padId, _text);
|
||||
await importEtherpad.setPadRaw(padId, text);
|
||||
}
|
||||
|
||||
// convert file to html if necessary
|
||||
|
|
Loading…
Reference in a new issue