mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
bin/rebuildPad.js: Add missing calls to util.callbackify
This commit is contained in:
parent
c622894fe0
commit
69efd16a6d
1 changed files with 3 additions and 3 deletions
|
@ -29,7 +29,7 @@ async.series([
|
|||
(callback) => {
|
||||
// Get a handle into the database
|
||||
db = require('ep_etherpad-lite/node/db/DB');
|
||||
db.init(callback);
|
||||
util.callbackify(db.init)(callback);
|
||||
},
|
||||
(callback) => {
|
||||
Pad = require('ep_etherpad-lite/node/db/Pad').Pad;
|
||||
|
@ -44,10 +44,10 @@ async.series([
|
|||
if (!PadManager.isValidPadId(newPadId)) {
|
||||
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');
|
||||
});
|
||||
PadManager.getPad(padId, (err, pad) => {
|
||||
util.callbackify(PadManager.getPad)(padId, (err, pad) => {
|
||||
oldPad = pad;
|
||||
newPad = new Pad(newPadId);
|
||||
callback();
|
||||
|
|
Loading…
Reference in a new issue