From 49c7a4ba82071595d2607c2a258eb388d2e05979 Mon Sep 17 00:00:00 2001 From: Tom Kunze Date: Mon, 21 Mar 2022 06:29:12 +0100 Subject: [PATCH] extractPadData: Fix wrong DB get function --- src/bin/extractPadData.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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); }