Payload being an ass whenever the code runs on the server or client
This commit is contained in:
parent
8fe41b3989
commit
b0416b61db
|
@ -67,19 +67,14 @@ export const afterDeleteWebhook: AfterDeleteHook = async ({ collection, doc }) =
|
||||||
return doc;
|
return doc;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!process.env.WEB_SERVER_HOOK_URL) throw new Error("Missing WEB_SERVER_HOOK_URL");
|
|
||||||
if (!process.env.WEB_SERVER_HOOK_TOKEN) throw new Error("Missing WEB_SERVER_HOOK_TOKEN");
|
|
||||||
if (!process.env.MEILISEARCH_HOOK_URL) throw new Error("Missing MEILISEARCH_HOOK_URL");
|
|
||||||
if (!process.env.MEILISEARCH_HOOK_TOKEN) throw new Error("Missing MEILISEARCH_HOOK_TOKEN");
|
|
||||||
|
|
||||||
const webhookTargets: { url: string; token: string }[] = [
|
const webhookTargets: { url: string; token: string }[] = [
|
||||||
{
|
{
|
||||||
url: process.env.WEB_SERVER_HOOK_URL,
|
url: process.env.WEB_SERVER_HOOK_URL ?? "",
|
||||||
token: process.env.WEB_SERVER_HOOK_TOKEN,
|
token: process.env.WEB_SERVER_HOOK_TOKEN ?? "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url: process.env.MEILISEARCH_HOOK_URL,
|
url: process.env.MEILISEARCH_HOOK_URL ?? "",
|
||||||
token: process.env.MEILISEARCH_HOOK_TOKEN,
|
token: process.env.MEILISEARCH_HOOK_TOKEN ?? "",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue