Skip to content

Commit

Permalink
#596: Fix the ability to rotate webhook secrets.
Browse files Browse the repository at this point in the history
  • Loading branch information
Norman Friis committed Oct 30, 2024
1 parent 0d1402c commit 1a18192
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

### Unreleased
* Fix for the webhook rotate secret calling the wrong endpoint

### 7.6.1 / 2024-10-30
* Add support for filtering events by masterEventID
* Add support for gzip compression
Expand Down
2 changes: 1 addition & 1 deletion src/resources/webhooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export class Webhooks extends Resource {
NylasResponse<WebhookWithSecret>
> {
return super._create({
path: `/v3/webhooks/${webhookId}/rotate-secret`,
path: `/v3/webhooks/rotate-secret/${webhookId}`,
requestBody: {},
overrides,
});
Expand Down
2 changes: 1 addition & 1 deletion tests/resources/webhooks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ describe('Webhooks', () => {

expect(apiClient.request).toHaveBeenCalledWith({
method: 'POST',
path: '/v3/webhooks/webhook123/rotate-secret',
path: '/v3/webhooks/rotate-secret/webhook123',
body: {},
overrides: {
apiUri: 'https://test.api.nylas.com',
Expand Down

0 comments on commit 1a18192

Please sign in to comment.