q-koa 10.5.0 → 10.5.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/core/app.js +8 -2
- package/package.json +1 -1
package/core/app.js
CHANGED
|
@@ -956,6 +956,7 @@ class APP {
|
|
|
956
956
|
excludeInclude,
|
|
957
957
|
raw = false,
|
|
958
958
|
is_split = false,
|
|
959
|
+
autoInclude = true,
|
|
959
960
|
omit = [],
|
|
960
961
|
...other
|
|
961
962
|
} = ctx.request.body
|
|
@@ -1008,7 +1009,10 @@ class APP {
|
|
|
1008
1009
|
? _.uniqWith(
|
|
1009
1010
|
[
|
|
1010
1011
|
...strInclude,
|
|
1011
|
-
...
|
|
1012
|
+
...(autoInclude
|
|
1013
|
+
? app[appName].include[controller]
|
|
1014
|
+
: []
|
|
1015
|
+
).filter((item) => {
|
|
1012
1016
|
return !strInclude.some(
|
|
1013
1017
|
(i) =>
|
|
1014
1018
|
(i.model && i.model.getName()) ===
|
|
@@ -1023,7 +1027,9 @@ class APP {
|
|
|
1023
1027
|
myInclude = null
|
|
1024
1028
|
} else {
|
|
1025
1029
|
myInclude = app[appName].include
|
|
1026
|
-
?
|
|
1030
|
+
? autoInclude
|
|
1031
|
+
? app[appName].include[controller]
|
|
1032
|
+
: []
|
|
1027
1033
|
: null
|
|
1028
1034
|
}
|
|
1029
1035
|
|