q-koa 13.1.4 → 13.1.5

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.
Files changed (2) hide show
  1. package/core/app.js +13 -0
  2. package/package.json +1 -1
package/core/app.js CHANGED
@@ -1207,6 +1207,19 @@ class APP {
1207
1207
  }
1208
1208
  return target
1209
1209
  }
1210
+
1211
+ if (
1212
+ where.hasOwnProperty('id') &&
1213
+ typeof where.id === 'string' &&
1214
+ where.id.includes('/')
1215
+ ) {
1216
+ const _result = await _.get(
1217
+ app[appName].controller,
1218
+ where.id.replace('/', '.')
1219
+ )(ctx)
1220
+ where.id = _result
1221
+ }
1222
+
1210
1223
  const formatWhere = _.mapValues(where, (item) => {
1211
1224
  if (!_.isObject(item)) return item
1212
1225
  return formatObj(item)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "13.1.4",
3
+ "version": "13.1.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {