File tree 2 files changed +2
-2
lines changed
packages/rocket-webhook-core/src
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ Add your rocket to your application in the configuration file.
17
17
### Generic
18
18
19
19
``` typescript
20
- import { AllowedHttpMethods } from ' @boostercloud/rocket-webhook-types'
20
+ import { AllowedHttpMethod } from ' @boostercloud/rocket-webhook-types'
21
21
22
22
function buildBoosterWebhook(config : BoosterConfig ): BoosterWebhook {
23
23
return new BoosterWebhook (config , [
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export async function dispatch(
28
28
const webhookParamsEvent = getWebhookParamsEvent ( params , request )
29
29
30
30
// Default allowedMethods to [POST] if not defined
31
- const allowedMethods = webhookParamsEvent . allowedMethods ?? AllowedHttpMethod . POST
31
+ const allowedMethods = webhookParamsEvent . allowedMethods ?? [ AllowedHttpMethod . POST ]
32
32
33
33
// Check if the request method is allowed
34
34
if ( ! allowedMethods . includes ( request . req . method as AllowedHttpMethod ) ) {
You can’t perform that action at this time.
0 commit comments