@azteam/express 1.2.417 → 1.2.421

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 _this.repository.restore(item, req.user.id);
237
+ return _this.repository["delete"](item, req.user.id);
238
238
  case 7:
239
239
  _context8.next = 9;
240
240
  return _this.afterDelete(item);
package/package.json CHANGED
@@ -1,41 +1 @@
1
- {
2
- "name": "@azteam/express",
3
- "version": "1.2.417",
4
- "license": "MIT",
5
- "author": "toda <sp.azsolution.net@gmail.com>",
6
- "main": "./lib/index.js",
7
- "module": "./src/index.js",
8
- "scripts": {
9
- "build": "babel src --delete-dir-on-start -d lib"
10
- },
11
- "dependencies": {
12
- "@azteam/constant": "1.0.8",
13
- "@azteam/crypto": "1.0.35",
14
- "@azteam/error": "1.0.34",
15
- "@azteam/http-client": "1.0.113",
16
- "@azteam/util": "1.0.41",
17
- "@azteam/validator": "1.0.21",
18
- "@grpc/grpc-js": "1.6.7",
19
- "@grpc/proto-loader": "0.6.12",
20
- "@socket.io/redis-adapter": "7.2.0",
21
- "body-parser": "1.19.0",
22
- "compression": "1.7.4",
23
- "cookie-parser": "1.4.4",
24
- "cors": "2.8.4",
25
- "eiows": "4.1.2",
26
- "ejs": "3.1.8",
27
- "etag": "1.8.1",
28
- "express": "4.17.1",
29
- "express-async-errors": "3.1.1",
30
- "express-rate-limit": "5.1.3",
31
- "helmet": "3.21.2",
32
- "jsonwebtoken": "9.0.0",
33
- "lodash": "4.17.21",
34
- "method-override": "3.0.0",
35
- "morgan": "1.10.0",
36
- "pluralize": "8.0.0",
37
- "psl": "1.8.0",
38
- "socket.io": "4.4.1",
39
- "ua-parser-js": "1.0.32"
40
- }
41
- }
1
+ {"name":"@azteam/express","version":"1.2.421","license":"MIT","author":"toda <sp.azsolution.net@gmail.com>","main":"./lib/index.js","module":"./src/index.js","scripts":{"prepublish":"babel src --delete-dir-on-start -d lib"},"dependencies":{"@azteam/constant":"1.0.8","@azteam/crypto":"1.0.35","@azteam/error":"1.0.36","@azteam/http-client":"1.0.115","@azteam/util":"1.0.43","@azteam/validator":"1.0.23","@grpc/grpc-js":"1.6.7","@grpc/proto-loader":"0.6.12","@socket.io/redis-adapter":"7.2.0","body-parser":"1.19.0","compression":"1.7.4","cookie-parser":"1.4.4","cors":"2.8.4","eiows":"4.1.2","ejs":"3.1.8","etag":"1.8.1","express":"4.17.1","express-async-errors":"3.1.1","express-rate-limit":"5.1.3","helmet":"3.21.2","jsonwebtoken":"9.0.0","lodash":"4.17.21","method-override":"3.0.0","morgan":"1.10.0","pluralize":"8.0.0","psl":"1.8.0","socket.io":"4.4.1","ua-parser-js":"1.0.32"}}
@@ -305,7 +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 this.repository.restore(item, req.user.id);
308
+ await this.repository.delete(item, req.user.id);
309
309
  await this.afterDelete(item);
310
310
 
311
311
  return res.success(true);
@@ -349,7 +349,7 @@ class AdminController extends Controller {
349
349
  }
350
350
 
351
351
  methodDeleteDestroyTrash = async (req, res) => {
352
- const item = await this.repository.findOne(
352
+ const item = await this.repository.findOneTrashById(
353
353
  {
354
354
  _id: req.params.id,
355
355
  },