extractPadData: Fix wrong DB get function
parent
a11cf67de7
commit
49c7a4ba82
|
@ -30,9 +30,7 @@ const padId = process.argv[2];
|
|||
// initialize output database
|
||||
const dirty = dirtyDB(`${padId}.db`);
|
||||
|
||||
// Promise wrapped get and set function
|
||||
const wrapped = db.db.db.wrappedDB;
|
||||
const get = util.promisify(wrapped.get.bind(wrapped));
|
||||
// Promise set function
|
||||
const set = util.promisify(dirty.set.bind(dirty));
|
||||
|
||||
// array in which required key values will be accumulated
|
||||
|
@ -55,7 +53,7 @@ const padId = process.argv[2];
|
|||
}
|
||||
|
||||
for (const dbkey of neededDBValues) {
|
||||
let dbvalue = await get(dbkey);
|
||||
let dbvalue = await db.get(dbkey);
|
||||
if (dbvalue && typeof dbvalue !== 'object') {
|
||||
dbvalue = JSON.parse(dbvalue);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue