anote-server-libs 0.4.4 → 0.4.5
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/services/WithBody.js +4 -4
- package/services/WithBody.ts +1 -1
package/package.json
CHANGED
package/services/WithBody.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WithBody = void 0;
|
|
3
|
+
exports.WithBody = exports.ajv = void 0;
|
|
4
4
|
const ajv_1 = require("ajv");
|
|
5
|
-
|
|
6
|
-
ajv.addKeyword({
|
|
5
|
+
exports.ajv = new ajv_1.default();
|
|
6
|
+
exports.ajv.addKeyword({
|
|
7
7
|
keyword: 'maxDigits',
|
|
8
8
|
type: 'number',
|
|
9
9
|
schemaType: 'number',
|
|
@@ -28,7 +28,7 @@ function WithBody(schema) {
|
|
|
28
28
|
});
|
|
29
29
|
schema.required = required;
|
|
30
30
|
}
|
|
31
|
-
const validate = ajv.compile(schema);
|
|
31
|
+
const validate = exports.ajv.compile(schema);
|
|
32
32
|
return function (_, __, descriptor) {
|
|
33
33
|
if (typeof descriptor.value === 'function') {
|
|
34
34
|
const previousMethod = descriptor.value;
|