feat(core): Remove conditional defaults in V1 release (#6363)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-06-02 11:10:19 +00:00
committed by कारतोफ्फेलस्क्रिप्ट™
parent e152cfe27c
commit f6366160a4
6 changed files with 7 additions and 30 deletions

View File

@@ -697,20 +697,11 @@ export async function executeWebhook(
/**
* Returns the base URL of the webhooks
*
*/
export function getWebhookBaseUrl() {
let urlBaseWebhook = GenericHelpers.getBaseUrl();
// We renamed WEBHOOK_TUNNEL_URL to WEBHOOK_URL. This is here to maintain
// backward compatibility. Will be deprecated and removed in the future.
if (process.env.WEBHOOK_TUNNEL_URL !== undefined || process.env.WEBHOOK_URL !== undefined) {
// @ts-ignore
urlBaseWebhook = process.env.WEBHOOK_TUNNEL_URL || process.env.WEBHOOK_URL;
}
let urlBaseWebhook = process.env.WEBHOOK_URL ?? GenericHelpers.getBaseUrl();
if (!urlBaseWebhook.endsWith('/')) {
urlBaseWebhook += '/';
}
return urlBaseWebhook;
}