koa-architect
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -52,9 +52,11 @@ | ||
for(let verb in module) { | ||
if (isFunction(module[verb]) || isArray(module[verb])) { | ||
router[verb](module[verb]) | ||
} else { | ||
for(let action in module[verb]) { | ||
let route = action.startsWith('/') ? action : '/' + action | ||
route = route === '/index' ? '/' : route | ||
router[verb](route, module[verb][action]) | ||
if (verb in router) { | ||
if (isFunction(module[verb]) || isArray(module[verb])) { | ||
router[verb](module[verb]) | ||
} else { | ||
for(let action in module[verb]) { | ||
let route = action.startsWith('/') ? action : '/' + action | ||
route = route === '/index' ? '/' : route | ||
router[verb](route, module[verb][action]) | ||
} | ||
} | ||
@@ -61,0 +63,0 @@ } |
{ | ||
"name": "koa-architect", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"homepage": "https://github.com/nervgh/koa-architect", | ||
@@ -5,0 +5,0 @@ "main": "lib/architect.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
7664
67