File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 1
1
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
3
3
import { APIResource } from '../core/resource' ;
4
+ import { toBase64 } from '../internal/utils' ;
4
5
import * as FilesAPI from './files/files' ;
5
6
import { Webhook } from 'standardwebhooks' ;
6
7
@@ -16,7 +17,7 @@ export class Webhooks extends APIResource {
16
17
if ( headers !== undefined ) {
17
18
const keyStr : string | null = key === undefined ? this . _client . webhookSecret : key ;
18
19
if ( keyStr === null ) throw new Error ( 'Webhook key must not be null in order to unwrap' ) ;
19
- const wh = new Webhook ( keyStr ) ;
20
+ const wh = new Webhook ( toBase64 ( keyStr ) ) ;
20
21
wh . verify ( body , headers ) ;
21
22
}
22
23
return JSON . parse ( body ) as UnwrapWebhookEvent ;
You can’t perform that action at this time.
0 commit comments