kopia lustrzana https://github.com/c9/core
adds a mount feature to frontdoor: mount sections into the existing chain
rodzic
bdd23d065b
commit
5bd78f5ecc
|
@ -70,6 +70,13 @@ module.exports = function Section(name, description, types) {
|
||||||
return section;
|
return section;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.mount = function( name, section ){
|
||||||
|
if (!sections[name])
|
||||||
|
sections[name] = [];
|
||||||
|
|
||||||
|
sections[name].push(section);
|
||||||
|
};
|
||||||
|
|
||||||
this._rootHandler = function(req, res) {
|
this._rootHandler = function(req, res) {
|
||||||
this.handle(req, res, function(err) {
|
this.handle(req, res, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
Ładowanie…
Reference in New Issue