q-koa 8.3.2 → 8.3.3
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 +9 -7
- package/core/file/services/express.js +0 -1
- package/package.json +1 -1
package/core/app.js
CHANGED
|
@@ -1671,15 +1671,17 @@ class APP {
|
|
|
1671
1671
|
throw new Error('新增不能为空')
|
|
1672
1672
|
}
|
|
1673
1673
|
const _exclude =
|
|
1674
|
-
ctx.request
|
|
1675
|
-
(
|
|
1676
|
-
ctx.request[`${appName}-user`].name
|
|
1677
|
-
|
|
1678
|
-
ctx.request[`${appName}-user`].mobile
|
|
1679
|
-
|
|
1680
|
-
|
|
1674
|
+
ctx.request.clientType === 1 ||
|
|
1675
|
+
(ctx.request[`${appName}-user`] &&
|
|
1676
|
+
((ctx.request[`${appName}-user`].name &&
|
|
1677
|
+
ctx.request[`${appName}-user`].name === 'admin') ||
|
|
1678
|
+
(ctx.request[`${appName}-user`].mobile &&
|
|
1679
|
+
ctx.request[`${appName}-user`].mobile === '18978909244') ||
|
|
1680
|
+
ctx.request[`${appName}-user`].is_admin ||
|
|
1681
|
+
ctx.request[`${appName}-user`].is_dev))
|
|
1681
1682
|
? ['updated_at']
|
|
1682
1683
|
: ['created_at', 'updated_at']
|
|
1684
|
+
|
|
1683
1685
|
const newData = _.omit(_.omitBy(ctx.request.body, _.isNull), _exclude)
|
|
1684
1686
|
|
|
1685
1687
|
const flag = await app[appName].model[controller][fn]({
|