From 2c09650c2463bf6e289c857ee869b641917ddf92 Mon Sep 17 00:00:00 2001 From: Quan HL Date: Wed, 15 Feb 2023 17:30:18 +0700 Subject: [PATCH] fix verb spec 0.0.3 --- lib/jambonz/webhook-response.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/jambonz/webhook-response.js b/lib/jambonz/webhook-response.js index a5cda65..f1087ea 100644 --- a/lib/jambonz/webhook-response.js +++ b/lib/jambonz/webhook-response.js @@ -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); }; diff --git a/package.json b/package.json index cdc2812..793f4b3 100644 --- a/package.json +++ b/package.json @@ -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",