@azteam/express 1.2.272 → 1.2.273
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
package/src/AdminController.js
CHANGED
|
@@ -30,12 +30,11 @@ class AdminController extends Controller {
|
|
|
30
30
|
this.guardResponse = options.guardResponse || [];
|
|
31
31
|
this.allowResponse = options.allowResponse ? [...options.allowResponse, ...ALLOW_FIELDS] : ALLOW_FIELDS;
|
|
32
32
|
|
|
33
|
-
this.rulesCreate =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
} || {};
|
|
33
|
+
this.rulesCreate = {
|
|
34
|
+
...options.rulesCreate,
|
|
35
|
+
priority: schemaNumber(true),
|
|
36
|
+
status: schemaEnum([0, 1, 2], true),
|
|
37
|
+
};
|
|
39
38
|
|
|
40
39
|
this.rulesModify = {
|
|
41
40
|
isForceModify: schemaBoolean(true),
|
package/src/Server.js
CHANGED
|
@@ -324,7 +324,7 @@ class Server {
|
|
|
324
324
|
throw new ErrorException(NOT_FOUND);
|
|
325
325
|
});
|
|
326
326
|
|
|
327
|
-
app.use(
|
|
327
|
+
app.use((err, req, res, next) => {
|
|
328
328
|
const error = errorCatch(err);
|
|
329
329
|
|
|
330
330
|
if (process.env.NODE_ENV === 'development') {
|
|
@@ -371,14 +371,14 @@ class Server {
|
|
|
371
371
|
|
|
372
372
|
return server;
|
|
373
373
|
}
|
|
374
|
-
throw Error('No controllers in use API');
|
|
374
|
+
throw new Error('No controllers in use API');
|
|
375
375
|
}
|
|
376
376
|
|
|
377
377
|
startSocket(port) {
|
|
378
378
|
if (!_.isEmpty(this.controllers)) {
|
|
379
379
|
return this;
|
|
380
380
|
}
|
|
381
|
-
throw Error('No controllers in use SOCKET');
|
|
381
|
+
throw new Error('No controllers in use SOCKET');
|
|
382
382
|
}
|
|
383
383
|
|
|
384
384
|
setAlertCallback(callback) {
|
package/src/SocketServer.js
CHANGED
package/src/validate.js
CHANGED
|
@@ -149,9 +149,7 @@ export const rulesSlug = {
|
|
|
149
149
|
export const rulesKey = {
|
|
150
150
|
key: schemaKey(),
|
|
151
151
|
};
|
|
152
|
-
|
|
153
|
-
type: schemaEnum(['web', 'app']),
|
|
154
|
-
};
|
|
152
|
+
|
|
155
153
|
export const rulesMetadata = {
|
|
156
154
|
metadata_disable: schemaBoolean(true),
|
|
157
155
|
metadata_title: schemaString(0, 255, true),
|