@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 +1 -1
- package/src/AdminController.js +2 -2
- package/src/validate.js +4 -0
package/package.json
CHANGED
package/src/AdminController.js
CHANGED
|
@@ -259,12 +259,12 @@ class AdminController extends Controller {
|
|
|
259
259
|
_id: req.params.id,
|
|
260
260
|
},
|
|
261
261
|
{
|
|
262
|
-
|
|
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,
|