@azteam/express 1.2.121 → 1.2.122

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azteam/express",
3
- "version": "1.2.121",
3
+ "version": "1.2.122",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "repository": {
@@ -114,8 +114,8 @@ class AdminController extends Controller {
114
114
  };
115
115
 
116
116
 
117
- async beforeModify(item, user) {
118
- return item;
117
+ async beforeModify(data, user) {
118
+ return data;
119
119
  };
120
120
 
121
121
  putModify() {
@@ -130,9 +130,9 @@ class AdminController extends Controller {
130
130
  let item = await this.options.roles.findOneById(req.params.id);
131
131
  if (!item) return res.error(NOT_EXISTS);
132
132
 
133
- item = await this.beforeModify(item, req.user);
133
+ const data = await this.beforeModify(req.body, req.user);
134
134
 
135
- item = await this.options.roles.modifyByUser(req.user.id, item, req.body);
135
+ item = await this.options.roles.modifyByUser(req.user.id, item, rdata);
136
136
 
137
137
  return res.success(item, this.options.guardResponse, this.options.allowResponse);
138
138
  }