mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-06-17 19:54:50 -04:00
more thenify in node/utils/*
This commit is contained in:
parent
584e481430
commit
5ef4a2d1d5
5 changed files with 26 additions and 21 deletions
|
@ -18,8 +18,9 @@
|
|||
var async = require("async");
|
||||
var db = require("../db/DB").db;
|
||||
var ERR = require("async-stacktrace");
|
||||
const thenify = require("thenify").withCallback;
|
||||
|
||||
exports.getPadRaw = function(padId, callback){
|
||||
exports.getPadRaw = thenify(function(padId, callback){
|
||||
async.waterfall([
|
||||
function(cb){
|
||||
db.get("pad:"+padId, cb);
|
||||
|
@ -69,4 +70,4 @@ exports.getPadRaw = function(padId, callback){
|
|||
], function(err, data){
|
||||
callback(null, data);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue