@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.
- package/lib/AdminController.js +5 -7
- package/package.json +1 -1
- package/src/AdminController.js +1 -3
package/lib/AdminController.js
CHANGED
|
@@ -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
|
-
|
|
203
|
-
item.
|
|
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
|
|
207
|
+
case 12:
|
|
210
208
|
item = _context6.sent;
|
|
211
209
|
return _context6.abrupt("return", res.success(item, _this.guardResponse, _this.allowResponse));
|
|
212
|
-
case
|
|
210
|
+
case 14:
|
|
213
211
|
case "end":
|
|
214
212
|
return _context6.stop();
|
|
215
213
|
}
|
package/package.json
CHANGED
package/src/AdminController.js
CHANGED
|
@@ -148,9 +148,7 @@ class AdminController extends Controller {
|
|
|
148
148
|
|
|
149
149
|
const data = await this.beforeModify(req.body);
|
|
150
150
|
|
|
151
|
-
item.
|
|
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
|
|