bin/rebuildPad.js: Add missing calls to `util.callbackify`

pull/4656/head
Richard Hansen 2021-01-17 03:58:28 -05:00 committed by John McLear
parent c622894fe0
commit 69efd16a6d
1 changed files with 3 additions and 3 deletions

View File

@ -29,7 +29,7 @@ async.series([
(callback) => { (callback) => {
// Get a handle into the database // Get a handle into the database
db = require('ep_etherpad-lite/node/db/DB'); db = require('ep_etherpad-lite/node/db/DB');
db.init(callback); util.callbackify(db.init)(callback);
}, },
(callback) => { (callback) => {
Pad = require('ep_etherpad-lite/node/db/Pad').Pad; Pad = require('ep_etherpad-lite/node/db/Pad').Pad;
@ -44,10 +44,10 @@ async.series([
if (!PadManager.isValidPadId(newPadId)) { if (!PadManager.isValidPadId(newPadId)) {
throw new Error('Cannot create a pad with that id as it is invalid'); throw new Error('Cannot create a pad with that id as it is invalid');
} }
PadManager.doesPadExists(newPadId, (err, exists) => { util.callbackify(PadManager.doesPadExist)(newPadId, (err, exists) => {
if (exists) throw new Error('Cannot create a pad with that id as it already exists'); if (exists) throw new Error('Cannot create a pad with that id as it already exists');
}); });
PadManager.getPad(padId, (err, pad) => { util.callbackify(PadManager.getPad)(padId, (err, pad) => {
oldPad = pad; oldPad = pad;
newPad = new Pad(newPadId); newPad = new Pad(newPadId);
callback(); callback();