Nick: custom metadata

This commit is contained in:
Nicolas 2024-12-12 13:30:00 -03:00
parent 1d1a936f2c
commit e22a0b596c
2 changed files with 3 additions and 0 deletions

View File

@ -251,6 +251,7 @@ export const webhookSchema = z.preprocess(
.object({
url: z.string().url(),
headers: z.record(z.string(), z.string()).default({}),
metadata: z.record(z.string(), z.string()).default({}),
})
.strict(strictMessage),
);

View File

@ -99,6 +99,7 @@ export const callWebhook = async (
: eventType === "crawl.page"
? data?.error || undefined
: undefined,
metadata: webhookUrl.metadata || undefined,
},
{
headers: {
@ -131,6 +132,7 @@ export const callWebhook = async (
: eventType === "crawl.page"
? data?.error || undefined
: undefined,
metadata: webhookUrl.metadata || undefined,
},
{
headers: {