Comparing version 1.0.7 to 1.0.8
@@ -18,12 +18,14 @@ "use strict"; | ||
var router = express_1.Router(); | ||
if (!controller.__routes_config__.middleware.length) | ||
router.use.apply(router, controller.__routes_config__.middleware); | ||
for (var _i = 0, _a = controller.__routes_config__.middleware; _i < _a.length; _i++) { | ||
var m = _a[_i]; | ||
router.use(m); | ||
} | ||
var routes = Object.values(controller.__routes_config__.routes); | ||
for (var _i = 0, routes_1 = routes; _i < routes_1.length; _i++) { | ||
var _a = routes_1[_i], url = _a.url, method = _a.method, stack = _a.stack; | ||
for (var _b = 0, routes_1 = routes; _b < routes_1.length; _b++) { | ||
var _c = routes_1[_b], url = _c.url, method = _c.method, stack = _c.stack; | ||
router[method].apply(router, __spreadArrays([url], stack)); | ||
} | ||
var subControllers = Object.values(controller.__routes_config__.subControllers); | ||
for (var _b = 0, subControllers_1 = subControllers; _b < subControllers_1.length; _b++) { | ||
var subController = subControllers_1[_b]; | ||
for (var _d = 0, subControllers_1 = subControllers; _d < subControllers_1.length; _d++) { | ||
var subController = subControllers_1[_d]; | ||
var subRouter = exports.convertToRouter(subController); | ||
@@ -30,0 +32,0 @@ router.use(subController.__routes_config__.url, subRouter); |
{ | ||
"name": "decopress", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "ExpressJS with TypeScript Decorators", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19282
237