Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down Expand Up @@ -280,15 +280,15 @@ 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)
};

if (data.id) {
opts.url += `/${data.id}`;
opts.method = 'patch';
opts.method = 'PATCH';
}

try {
Expand Down