adds a mount feature to frontdoor: mount sections into the existing chain

pull/43/merge
Matthijs van Henten 2015-05-21 23:41:09 +00:00
rodzic bdd23d065b
commit 5bd78f5ecc
1 zmienionych plików z 7 dodań i 0 usunięć

7
node_modules/frontdoor/lib/section.js wygenerowano vendored
Wyświetl plik

@ -70,6 +70,13 @@ module.exports = function Section(name, description, types) {
return section;
};
this.mount = function( name, section ){
if (!sections[name])
sections[name] = [];
sections[name].push(section);
};
this._rootHandler = function(req, res) {
this.handle(req, res, function(err) {
if (err) {