waibu-rest-api 1.0.3 → 1.0.4

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.
@@ -5,7 +5,7 @@ async function serveRoute ({ mod, ns, parent }) {
5
5
  const mergeRouteHooks = await importModule('waibu:/lib/webapp-scope/merge-route-hooks.js')
6
6
  const cfgWdb = this.app.waibuDb.config
7
7
  mod.config = mod.config ?? {}
8
- mod.config.prefix = getPluginPrefix(ns)
8
+ mod.config.prefix = getPluginPrefix(ns, 'waibuRestApi')
9
9
  mod.config.pathSrc = mod.url
10
10
  mod.config.webApp = parent ?? ns
11
11
  mod.config.ns = ns
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-rest-api",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "REST API for Waibu",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/waibu/boot.js CHANGED
@@ -51,7 +51,7 @@ const boot = {
51
51
  const me = this
52
52
 
53
53
  await eachPlugins(async function ({ dir, alias, ns }) {
54
- const appPrefix = '/' + (ns === me.app.bajo.mainNs && me.config.mountMainAsRoot ? '' : getPluginPrefix(ns))
54
+ const appPrefix = '/' + (ns === me.app.bajo.mainNs && getPluginPrefix(ns, 'waibuRestApi'))
55
55
  const pattern = [
56
56
  `${dir}/${pathPrefix}/**/{${actions.join(',')}}.js`,
57
57
  `${dir}/${pathPrefix}/**/model-builder.*`