kopia lustrzana https://github.com/c9/core
Fix login / error handling
rodzic
59ad896919
commit
37286ec012
|
@ -96,6 +96,8 @@ module.exports = function Section(name, description, types) {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
this.mount = function(name, section) {
|
this.mount = function(name, section) {
|
||||||
|
var that = this;
|
||||||
|
|
||||||
if (arguments.length == 1) {
|
if (arguments.length == 1) {
|
||||||
section = arguments[0];
|
section = arguments[0];
|
||||||
|
|
||||||
|
@ -105,7 +107,11 @@ module.exports = function Section(name, description, types) {
|
||||||
var addRoutes = section.getRoutes();
|
var addRoutes = section.getRoutes();
|
||||||
|
|
||||||
Object.keys(addRoutes).forEach(function(method) {
|
Object.keys(addRoutes).forEach(function(method) {
|
||||||
routes[method] = [].concat( routes[method], addRoutes[method] );
|
var r = addRoutes[method];
|
||||||
|
r.forEach(function(route) {
|
||||||
|
route.parent = that;
|
||||||
|
})
|
||||||
|
routes[method] = [].concat(routes[method], r);
|
||||||
});
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
Ładowanie…
Reference in New Issue