Skip to content

Commit 13c716e

Browse files
committed
fix(webhooks): revert toBase64 conversion for webhook key
1 parent f243bc9 commit 13c716e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/resources/webhooks.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
import { APIResource } from '../core/resource';
4-
import { toBase64 } from '../internal/utils';
54
import * as FilesAPI from './files/files';
65
import { Webhook } from 'standardwebhooks';
76

@@ -17,7 +16,7 @@ export class Webhooks extends APIResource {
1716
if (headers !== undefined) {
1817
const keyStr: string | null = key === undefined ? this._client.webhookSecret : key;
1918
if (keyStr === null) throw new Error('Webhook key must not be null in order to unwrap');
20-
const wh = new Webhook(toBase64(keyStr));
19+
const wh = new Webhook(keyStr);
2120
wh.verify(body, headers);
2221
}
2322
return JSON.parse(body) as UnwrapWebhookEvent;

0 commit comments

Comments
 (0)