* Rewrite of menu.json handling. More flexability

* Wildcards in menu.json
* Basic menu.json submit filtering working
This commit is contained in:
Bryan Ashby 2015-04-01 22:13:29 -06:00
parent 1ae571ee44
commit ae71aa9feb
5 changed files with 124 additions and 87 deletions

View file

@ -6,6 +6,7 @@ var paths = require('path');
var conf = require('./config.js');
var miscUtil = require('./misc_util.js');
var _ = require('lodash');
// exports
exports.loadModule = loadModule;
@ -36,7 +37,7 @@ function loadModule(name, category, cb) {
return;
}
if(!mod.getModule || typeof mod.getModule !== 'function') {
if(!_.isFunction(mod.getModule)) {
cb(new Error('Invalid or missing missing \'getModule\' method'));
return;
}