Skip to content

Commit c8457a7

Browse files
committed
Fixed webhook triggering for empty context
1 parent b71d7f2 commit c8457a7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/webhook/webhook.controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class WebhookController {
5454

5555
@Post(':name')
5656
public async triggerWebhookFunction(@Param('name') name: string, @Body() payload: any) {
57-
return await this.webhookService.triggerWebhookContextFunction(null, name, payload);
57+
return await this.webhookService.triggerWebhookContextFunction('', name, payload);
5858
}
5959

6060
@Patch(':id')

src/webhook/webhook.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,10 @@ export class WebhookService {
157157
name: webhookHandle.name,
158158
context: webhookHandle.context,
159159
urls: [
160-
`${this.config.hostUrl}/webhook/${webhookHandle.id}`,
160+
`${this.config.hostUrl}/webhooks/${webhookHandle.id}`,
161161
webhookHandle.context
162-
? `${this.config.hostUrl}/webhook/${webhookHandle.context}/${webhookHandle.name}`
163-
: `${this.config.hostUrl}/webhook/${webhookHandle.name}`,
162+
? `${this.config.hostUrl}/webhooks/${webhookHandle.context}/${webhookHandle.name}`
163+
: `${this.config.hostUrl}/webhooks/${webhookHandle.name}`,
164164
],
165165
};
166166
}

0 commit comments

Comments
 (0)