mirror of
https://github.com/jambonz/jambonz-node.git
synced 2026-01-25 02:08:15 +00:00
fix verb spec 0.0.3
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user