1
0
mirror of /repos/Prototyper.git synced 2025-12-30 06:31:32 +01:00
Prototyper/lib/handlers.js
2013-05-12 11:58:42 +02:00

26 lines
636 B
JavaScript

module.exports = function (mongoDataInstance, previewInstance, importerInstance) {
function getAttribute(options, callback) {
mongoDataInstance.getMongoAttribute(options, callback);
}
function getContent(options, callback) {
mongoDataInstance.getMongoContent(options, callback);
}
function getPreviewHTML(html, options, callback) {
previewInstance.getPreviewHTML(html, options, callback);
}
function importer(doc, options, callback) {
importerInstance.importer(doc, options, callback);
}
return {
getAttribute: getAttribute,
getContent: getContent,
getPreviewHTML: getPreviewHTML,
importer: importer
}
};