@azteam/express 1.2.416 → 1.2.417
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.
|
@@ -234,7 +234,7 @@ var AdminController = /*#__PURE__*/function (_Controller) {
|
|
|
234
234
|
return _context8.abrupt("return", res.error(_error.NOT_EXISTS));
|
|
235
235
|
case 5:
|
|
236
236
|
_context8.next = 7;
|
|
237
|
-
return item
|
|
237
|
+
return _this.repository.restore(item, req.user.id);
|
|
238
238
|
case 7:
|
|
239
239
|
_context8.next = 9;
|
|
240
240
|
return _this.afterDelete(item);
|
|
@@ -269,7 +269,7 @@ var AdminController = /*#__PURE__*/function (_Controller) {
|
|
|
269
269
|
return _context9.abrupt("return", res.error(_error.NOT_EXISTS));
|
|
270
270
|
case 5:
|
|
271
271
|
_context9.next = 7;
|
|
272
|
-
return
|
|
272
|
+
return _this.repository.restore(item, req.user.id);
|
|
273
273
|
case 7:
|
|
274
274
|
return _context9.abrupt("return", res.success(true));
|
|
275
275
|
case 8:
|
package/package.json
CHANGED
|
@@ -305,8 +305,7 @@ class AdminController extends Controller {
|
|
|
305
305
|
const item = await this.repository.findOneById(req.params.id);
|
|
306
306
|
if (!item) return res.error(NOT_EXISTS);
|
|
307
307
|
|
|
308
|
-
await
|
|
309
|
-
|
|
308
|
+
await this.repository.restore(item, req.user.id);
|
|
310
309
|
await this.afterDelete(item);
|
|
311
310
|
|
|
312
311
|
return res.success(true);
|
|
@@ -328,7 +327,7 @@ class AdminController extends Controller {
|
|
|
328
327
|
const item = await this.repository.findOneTrashById(req.params.id);
|
|
329
328
|
if (!item) return res.error(NOT_EXISTS);
|
|
330
329
|
|
|
331
|
-
await
|
|
330
|
+
await this.repository.restore(item, req.user.id);
|
|
332
331
|
|
|
333
332
|
return res.success(true);
|
|
334
333
|
};
|