mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-15 16:55:54 +08:00
Nick: custom metadata
This commit is contained in:
parent
1d1a936f2c
commit
e22a0b596c
@ -251,6 +251,7 @@ export const webhookSchema = z.preprocess(
|
|||||||
.object({
|
.object({
|
||||||
url: z.string().url(),
|
url: z.string().url(),
|
||||||
headers: z.record(z.string(), z.string()).default({}),
|
headers: z.record(z.string(), z.string()).default({}),
|
||||||
|
metadata: z.record(z.string(), z.string()).default({}),
|
||||||
})
|
})
|
||||||
.strict(strictMessage),
|
.strict(strictMessage),
|
||||||
);
|
);
|
||||||
|
@ -99,6 +99,7 @@ export const callWebhook = async (
|
|||||||
: eventType === "crawl.page"
|
: eventType === "crawl.page"
|
||||||
? data?.error || undefined
|
? data?.error || undefined
|
||||||
: undefined,
|
: undefined,
|
||||||
|
metadata: webhookUrl.metadata || undefined,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
@ -131,6 +132,7 @@ export const callWebhook = async (
|
|||||||
: eventType === "crawl.page"
|
: eventType === "crawl.page"
|
||||||
? data?.error || undefined
|
? data?.error || undefined
|
||||||
: undefined,
|
: undefined,
|
||||||
|
metadata: webhookUrl.metadata || undefined,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user