mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-05 20:56:07 +08:00
Merge pull request #970 from mendableai/nsc/webhooks-custom-metadata
Metadata for webhooks
This commit is contained in:
commit
4c9e9836aa
@ -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),
|
||||
);
|
||||
|
@ -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: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user