Skip to content

Commit a7212c6

Browse files
author
Castro, Mario
committed
Small fixes
1 parent 8754a38 commit a7212c6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Add your rocket to your application in the configuration file.
1717
### Generic
1818

1919
```typescript
20-
import { AllowedHttpMethods } from '@boostercloud/rocket-webhook-types'
20+
import { AllowedHttpMethod } from '@boostercloud/rocket-webhook-types'
2121

2222
function buildBoosterWebhook(config: BoosterConfig): BoosterWebhook {
2323
return new BoosterWebhook(config, [

packages/rocket-webhook-core/src/webhook-dispatcher.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export async function dispatch(
2828
const webhookParamsEvent = getWebhookParamsEvent(params, request)
2929

3030
// Default allowedMethods to [POST] if not defined
31-
const allowedMethods = webhookParamsEvent.allowedMethods ?? AllowedHttpMethod.POST
31+
const allowedMethods = webhookParamsEvent.allowedMethods ?? [AllowedHttpMethod.POST]
3232

3333
// Check if the request method is allowed
3434
if (!allowedMethods.includes(request.req.method as AllowedHttpMethod)) {

0 commit comments

Comments
 (0)