mirror of
https://github.com/jambonz/jambonz-node.git
synced 2026-07-04 19:31:48 +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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user