remove findkeys from pad export
parent
89ad3cb809
commit
806c9207e3
|
@ -22,25 +22,18 @@ var ERR = require("async-stacktrace");
|
||||||
exports.getPadRaw = function(padId, callback){
|
exports.getPadRaw = function(padId, callback){
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
function(cb){
|
function(cb){
|
||||||
|
db.get("pad:"+padId, cb);
|
||||||
// Get the Pad
|
|
||||||
db.findKeys("pad:"+padId, null, function(err,padcontent){
|
|
||||||
if(!err){
|
|
||||||
cb(err, padcontent);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
function(padcontent,cb){
|
function(padcontent,cb){
|
||||||
|
var records = ["pad:"+padId];
|
||||||
// Get the Pad available content keys
|
for (var i = 0; i <= padcontent.head; i++) {
|
||||||
db.findKeys("pad:"+padId+":*", null, function(err,records){
|
records.push("pad:"+padId+":revs:" + i);
|
||||||
if(!err){
|
|
||||||
for (var key in padcontent) { records.push(padcontent[key]);}
|
|
||||||
cb(err, records);
|
|
||||||
}
|
}
|
||||||
})
|
|
||||||
},
|
for (var i = 0; i <= padcontent.chatHead; i++) {
|
||||||
function(records, cb){
|
records.push("pad:"+padId+":chat:" + i);
|
||||||
|
}
|
||||||
|
|
||||||
var data = {};
|
var data = {};
|
||||||
|
|
||||||
async.forEachSeries(Object.keys(records), function(key, r){
|
async.forEachSeries(Object.keys(records), function(key, r){
|
||||||
|
|
Loading…
Reference in New Issue