enhance(webhook): add userId to payload
This commit is contained in:
parent
f8e6f3cc73
commit
ec3be7e4d3
|
@ -268,6 +268,7 @@ export function webhookDeliver(webhook: Webhook, type: typeof webhookEventTypes[
|
||||||
type,
|
type,
|
||||||
content,
|
content,
|
||||||
webhookId: webhook.id,
|
webhookId: webhook.id,
|
||||||
|
userId: webhook.userId,
|
||||||
to: webhook.url,
|
to: webhook.url,
|
||||||
secret: webhook.secret,
|
secret: webhook.secret,
|
||||||
createdAt: Date.now(),
|
createdAt: Date.now(),
|
||||||
|
|
|
@ -23,6 +23,7 @@ export default async (job: Bull.Job<WebhookDeliverJobData>) => {
|
||||||
},
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
hookId: job.data.webhookId,
|
hookId: job.data.webhookId,
|
||||||
|
userId: job.data.userId,
|
||||||
eventId: job.data.eventId,
|
eventId: job.data.eventId,
|
||||||
createdAt: job.data.createdAt,
|
createdAt: job.data.createdAt,
|
||||||
type: job.data.type,
|
type: job.data.type,
|
||||||
|
|
|
@ -51,6 +51,7 @@ export type WebhookDeliverJobData = {
|
||||||
type: string;
|
type: string;
|
||||||
content: unknown;
|
content: unknown;
|
||||||
webhookId: Webhook['id'];
|
webhookId: Webhook['id'];
|
||||||
|
userId: User['id'];
|
||||||
to: string;
|
to: string;
|
||||||
secret: string;
|
secret: string;
|
||||||
createdAt: number;
|
createdAt: number;
|
||||||
|
|
Loading…
Reference in New Issue