@azteam/express 1.2.226 → 1.2.229

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.226",
3
+ "version": "1.2.229",
4
4
  "main": "src/index.js",
5
5
  "engines": {
6
6
  "node": ">= 12.0.0",
@@ -259,12 +259,12 @@ class AdminController extends Controller {
259
259
  _id: req.params.id,
260
260
  },
261
261
  {
262
- trash: true,
262
+ force: true,
263
263
  }
264
264
  );
265
265
  if (!item) return res.error(NOT_EXISTS);
266
266
 
267
- const oldItem = item;
267
+ const oldItem = _.cloneDeep(item);
268
268
 
269
269
  await this.repository.destroy(item.id);
270
270
 
package/src/validate.js CHANGED
@@ -94,6 +94,10 @@ export const schemaVersion = (optional = false) => ({
94
94
  max: 300,
95
95
  optional,
96
96
  });
97
+ export const schemaArray = (optional = false) => ({
98
+ type: 'array',
99
+ optional,
100
+ });
97
101
  export const schemaJSON = (optional = false) => ({
98
102
  type: 'json',
99
103
  optional,