more thenify in node/utils/*

This commit is contained in:
Ray Bellis 2019-01-22 17:30:33 +00:00
parent 584e481430
commit 5ef4a2d1d5
5 changed files with 26 additions and 21 deletions

View file

@ -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);
});
}
});