q-koa 8.4.6 → 8.5.2

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/core/app.js CHANGED
@@ -1083,6 +1083,8 @@ class APP {
1083
1083
  [controller + '_id']: idList,
1084
1084
  ...myInclude[j].where,
1085
1085
  },
1086
+ order: myInclude[j].order,
1087
+ limit: myInclude[j].limit,
1086
1088
  include: myInclude[j].include,
1087
1089
  })
1088
1090
  objList = {
@@ -104,7 +104,9 @@ exports.showTables = async (ctx) => {
104
104
  const defaultConfigPath = path.resolve(__dirname, `../${_model}/config.js`)
105
105
  const defaultConfigExist = fs.existsSync(defaultConfigPath)
106
106
  const target =
107
- Object.keys(app.config[_model]).length === 0 && defaultConfigExist
107
+ app.config[_model] &&
108
+ Object.keys(app.config[_model]).length === 0 &&
109
+ defaultConfigExist
108
110
  ? require(defaultConfigPath)
109
111
  : app.config[_model]
110
112
  // const target = Object.keys(app.config[model])
@@ -15,7 +15,7 @@ exports.getList = (config) => (type) => {
15
15
  return list
16
16
  }
17
17
 
18
- exports.getObject = (config) => (type) => {
18
+ exports.getObject = (config, app) => async (type) => {
19
19
  if (app) {
20
20
  const applicationList = await app.cache.get('application')
21
21
  if (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "8.4.6",
3
+ "version": "8.5.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {