session-open-group-server-l.../logic.js

23 lines
421 B
JavaScript
Raw Permalink Normal View History

const funcs = [];
funcs.push(require('./logic/permissions.js'));
2019-11-08 04:41:53 +01:00
let storage;
let cache;
2019-11-08 04:41:53 +01:00
function setup(configObject) {
({ storage, cache, config } = configObject);
2019-11-08 04:41:53 +01:00
funcs.forEach((func) => {
func.start(configObject);
2019-11-08 04:41:53 +01:00
});
}
let functions = {};
2019-11-08 04:41:53 +01:00
funcs.forEach((func) => {
functions = Object.assign(functions, func);
2019-11-08 04:41:53 +01:00
});
module.exports = functions;
2019-11-08 04:41:53 +01:00
// override all those starts
module.exports.setup = setup;