diff --git a/src/bin/extractPadData.js b/src/bin/extractPadData.js index 353c5d21e..b0d0212d7 100644 --- a/src/bin/extractPadData.js +++ b/src/bin/extractPadData.js @@ -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); }