waibu 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +4 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -22,7 +22,7 @@ async function factory (pkgName) {
|
|
|
22
22
|
this.dependencies = ['bajo-logger', 'bajo-extra']
|
|
23
23
|
this.config = {
|
|
24
24
|
server: {
|
|
25
|
-
host: '
|
|
25
|
+
host: '0.0.0.0',
|
|
26
26
|
port: 7771
|
|
27
27
|
},
|
|
28
28
|
factory: {
|
|
@@ -142,7 +142,9 @@ async function factory (pkgName) {
|
|
|
142
142
|
const { outmatch } = this.lib
|
|
143
143
|
const { find } = this.lib._
|
|
144
144
|
const { breakNsPath } = this.app.bajo
|
|
145
|
-
|
|
145
|
+
let { ns, subNs = '', path } = breakNsPath(route)
|
|
146
|
+
const params = path.split('|')
|
|
147
|
+
if (params.length > 1) path = params[0]
|
|
146
148
|
return find(this.routes, r => {
|
|
147
149
|
if (r.path.startsWith('*')) return false
|
|
148
150
|
r.config = r.config ?? {}
|