fix verb spec 0.0.3

This commit is contained in:
Quan HL
2023-02-15 17:30:18 +07:00
parent 8b0cea978a
commit 2c09650c24
2 changed files with 4 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
const crypto = require('crypto');
const logger = { debug: require('debug')('jambonz:jambonz-node')};
const {validateVerb} = require('verb-specifications/jambonz-app-json-validation');
const specs = new Map(Object.entries(require('verb-specifications/specs')));
const {validateVerb, specs } = require('verb-specifications');
const _specs = new Map(Object.entries(specs));
const EXPECTED_SCHEME = 'v1';
const DEFAULT_TOLERANCE = 300; // 5 minutes
@@ -133,7 +133,7 @@ class WebhookResponse {
}
}
for (const [verb] of specs) {
for (const [verb] of _specs) {
WebhookResponse.prototype[verb.replace(':', '_')] = function(payload) {
return WebhookResponse.prototype.addVerb.call(this, verb, payload);
};

View File

@@ -19,7 +19,7 @@
"debug": "^4.3.1",
"parseurl": "^1.3.3",
"pino": "^7.8.0",
"verb-specifications": "^0.0.2"
"verb-specifications": "^0.0.3"
},
"devDependencies": {
"eslint": "^8.20.0",