export support
parent
91268e14b7
commit
55900b4c23
|
@ -16,6 +16,7 @@
|
|||
|
||||
|
||||
let db = require("../db/DB");
|
||||
let hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
|
||||
|
||||
exports.getPadRaw = async function(padId) {
|
||||
|
||||
|
@ -23,6 +24,7 @@ exports.getPadRaw = async function(padId) {
|
|||
let padcontent = await db.get(padKey);
|
||||
|
||||
let records = [ padKey ];
|
||||
|
||||
for (let i = 0; i <= padcontent.head; i++) {
|
||||
records.push(padKey + ":revs:" + i);
|
||||
}
|
||||
|
@ -58,5 +60,17 @@ exports.getPadRaw = async function(padId) {
|
|||
}
|
||||
}
|
||||
|
||||
await Promise.all([
|
||||
// get content that has a different prefix IE comments:padId:foo
|
||||
// a plugin would return something likle ["comments", "cakes"]
|
||||
hooks.aCallAll('exportEtherpadAdditionalContent').then((prefixes) => {
|
||||
prefixes.forEach(async function(prefix) {
|
||||
let pluginContent = await db.get(prefix + ":" + padId);
|
||||
data[prefix] = pluginContent;
|
||||
});
|
||||
})
|
||||
]);
|
||||
|
||||
|
||||
return data;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue