@azteam/express 1.2.316 → 1.2.317

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.
@@ -199,17 +199,15 @@ var AdminController = /*#__PURE__*/function (_Controller) {
199
199
  return _this.beforeModify(req.body);
200
200
  case 7:
201
201
  data = _context6.sent;
202
- item.loadData(data);
203
- item.modified_id = req.user.id;
202
+ _context6.next = 10;
203
+ return item.modify(data, req.user.id);
204
+ case 10:
204
205
  _context6.next = 12;
205
- return item.save();
206
- case 12:
207
- _context6.next = 14;
208
206
  return _this.afterModify(item);
209
- case 14:
207
+ case 12:
210
208
  item = _context6.sent;
211
209
  return _context6.abrupt("return", res.success(item, _this.guardResponse, _this.allowResponse));
212
- case 16:
210
+ case 14:
213
211
  case "end":
214
212
  return _context6.stop();
215
213
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azteam/express",
3
- "version": "1.2.316",
3
+ "version": "1.2.317",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./src/index.js",
6
6
  "scripts": {
@@ -148,9 +148,7 @@ class AdminController extends Controller {
148
148
 
149
149
  const data = await this.beforeModify(req.body);
150
150
 
151
- item.loadData(data);
152
- item.modified_id = req.user.id;
153
- await item.save();
151
+ await item.modify(data, req.user.id);
154
152
 
155
153
  item = await this.afterModify(item);
156
154