diff --git a/lib/index.js b/lib/index.js index 041d22b..bc6d3c3 100755 --- a/lib/index.js +++ b/lib/index.js @@ -238,7 +238,7 @@ class PubSubClient extends EventEmitter { * @returns {*} */ async update(id, data = {}, options = {}) { - debug.info('patch', id); + logger.info('patch', id); if (!id) { throw new Error('required event id'); } @@ -280,7 +280,7 @@ class PubSubClient extends EventEmitter { const body = JSON.stringify(data); const opts = { url: url.href, - method: 'post', + method: 'POST', headers: this.#makeHeaders(body), body, signal: AbortSignal.timeout(this.#timeout) @@ -288,7 +288,7 @@ class PubSubClient extends EventEmitter { if (data.id) { opts.url += `/${data.id}`; - opts.method = 'patch'; + opts.method = 'PATCH'; } try {