File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
packages/rocket-webhook-azure-infrastructure/src Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,11 @@ const { boosterRocketDispatcher } = require('./dist/index')
66 }
77
88 static generateFunctionsCode ( endpoint : string ) : string {
9- const name = endpoint . replace ( / \/ / g, '_' )
109 return `
11- app.http(' ${ name } ' , {
10+ app.http(${ JSON . stringify ( endpoint . replace ( / [ ^ a - z A - Z 0 - 9 _ ] / g , '_' ) ) } , {
1211 methods: ['POST', 'GET'],
1312 authLevel: 'anonymous',
14- route: ' ${ endpoint } ' ,
13+ route: ${ JSON . stringify ( endpoint ) } ,
1514 handler: async (request, context) => {
1615 const headers = {}
1716 request.headers.forEach((value, key) => { headers[key] = value })
@@ -39,7 +38,6 @@ app.http('${name}', {
3938 }
4039
4140 const webhookRequest = {
42- ROCKET_FUNCTION_ID: process.env.ROCKET_FUNCTION_ID,
4341 req: {
4442 method: request.method,
4543 url: request.url,
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { WebhookParams } from '@boostercloud/rocket-webhook-types'
66const AzureWebhook = ( params : WebhookParams ) : InfrastructureRocket => ( {
77 mountStack : Synth . mountStack . bind ( Synth , params ) ,
88 mountFunctionsV4 : Functions . mountFunctionsV4 . bind ( Functions , params ) ,
9- getFunctionAppName : Functions . getFunctionAppName . bind ( Synth , params ) ,
9+ getFunctionAppName : Functions . getFunctionAppName . bind ( Functions , params ) ,
1010} )
1111
1212export default AzureWebhook
You can’t perform that action at this time.
0 commit comments