mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
extractPadData: Fix wrong DB get function
This commit is contained in:
parent
a11cf67de7
commit
49c7a4ba82
1 changed files with 2 additions and 4 deletions
|
@ -30,9 +30,7 @@ const padId = process.argv[2];
|
||||||
// initialize output database
|
// initialize output database
|
||||||
const dirty = dirtyDB(`${padId}.db`);
|
const dirty = dirtyDB(`${padId}.db`);
|
||||||
|
|
||||||
// Promise wrapped get and set function
|
// Promise set function
|
||||||
const wrapped = db.db.db.wrappedDB;
|
|
||||||
const get = util.promisify(wrapped.get.bind(wrapped));
|
|
||||||
const set = util.promisify(dirty.set.bind(dirty));
|
const set = util.promisify(dirty.set.bind(dirty));
|
||||||
|
|
||||||
// array in which required key values will be accumulated
|
// array in which required key values will be accumulated
|
||||||
|
@ -55,7 +53,7 @@ const padId = process.argv[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const dbkey of neededDBValues) {
|
for (const dbkey of neededDBValues) {
|
||||||
let dbvalue = await get(dbkey);
|
let dbvalue = await db.get(dbkey);
|
||||||
if (dbvalue && typeof dbvalue !== 'object') {
|
if (dbvalue && typeof dbvalue !== 'object') {
|
||||||
dbvalue = JSON.parse(dbvalue);
|
dbvalue = JSON.parse(dbvalue);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue