refactor(core): Move all base URLs to UrlService (no-changelog) (#8141)

This change kept coming up in #6713, #7773, and #8135. 
So this PR moves the existing code without actually changing anything,
to help get rid of some of the circular dependencies.


## Review / Merge checklist
- [x] PR title and summary are descriptive.
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-12-22 15:19:50 +01:00
committed by GitHub
parent 517b050d0a
commit baee47a276
16 changed files with 93 additions and 85 deletions

View File

@@ -49,7 +49,6 @@ import type {
WebhookCORSRequest,
WebhookRequest,
} from '@/Interfaces';
import * as GenericHelpers from '@/GenericHelpers';
import * as ResponseHelper from '@/ResponseHelper';
import * as WorkflowHelpers from '@/WorkflowHelpers';
import { WorkflowRunner } from '@/WorkflowRunner';
@@ -820,14 +819,3 @@ export async function executeWebhook(
return;
}
}
/**
* Returns the base URL of the webhooks
*/
export function getWebhookBaseUrl() {
let urlBaseWebhook = process.env.WEBHOOK_URL ?? GenericHelpers.getBaseUrl();
if (!urlBaseWebhook.endsWith('/')) {
urlBaseWebhook += '/';
}
return urlBaseWebhook;
}