This commit is contained in:
Cedric Hoelzl 2020-07-01 11:11:56 +02:00
parent c45d28ee74
commit 2e3320eb5c

8
db.js
View File

@ -41,11 +41,15 @@ module.exports = function(name){
};
this.set_v = function(cid,v){
return this.db.find({id:cid}).set('tracking',v).write();
return new Promise((resolve, reject)=>{
resolve(this.db.find({id:cid}).set('tracking',v).write());
});
};
this.get_v = function(cid){
return this.db.find({id:cid}).get('tracking').value();
return new Promise((resolve, reject)=>{
resolve(this.db.find({id:cid}).get('tracking').value());
});
}
return this;