Comparing version 0.1.4 to 0.1.5
@@ -15,2 +15,3 @@ import Service from './service.js' | ||
this.mixins = {} | ||
this.headers = {} | ||
this.services = {} | ||
@@ -24,2 +25,3 @@ this.headers = {} | ||
} | ||
this.children = config.children || {} | ||
if (config.services) { | ||
@@ -44,3 +46,2 @@ forEach(config.services, (service, name) => | ||
} | ||
} | ||
@@ -66,3 +67,9 @@ | ||
let path = name.split('/') | ||
let service = get(this.services, name) | ||
let service = this.services[path.shift()] | ||
forEach(path, item => { | ||
if (!service.children || !(name in service.children)) { | ||
throw `Service ${name} not found` | ||
} | ||
service = service.children[item] | ||
}) | ||
try { | ||
@@ -69,0 +76,0 @@ if (!service) throw `Service ${name} not found` |
{ | ||
"name": "apicase", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Create, group and manage your APIs with json declaration", | ||
@@ -5,0 +5,0 @@ "author": "kelin2025", |
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
10079
319