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
+3 -3
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);
};