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

@ -17,8 +17,9 @@
var log4js = require('log4js');
var async = require("async");
var db = require("../db/DB").db;
const thenify = require("thenify").withCallback;
exports.setPadRaw = function(padId, records, callback)
exports.setPadRaw = thenify(function(padId, records, callback)
{
records = JSON.parse(records);
@ -70,4 +71,4 @@ exports.setPadRaw = function(padId, records, callback)
function() {
callback(null, true);
});
}
});