1cee587709
Fix inconsistent domain URL formats : removing the last / that was caused by URL method Standardize URL formatting to ensure consistent links storage and retrieval of domain URLs across the application. Will improve the dedpulicates in the links Note: there is another temporary issue from google that was solved on the 13th of june https://groups.google.com/g/adwords-api/c/tRSQMRZrJYM but we consider this out of this scope Fixes #12621
13 lines
266 B
TypeScript
13 lines
266 B
TypeScript
export const getAbsoluteUrl = (value: string): string => {
|
|
if (
|
|
value.startsWith('http://') ||
|
|
value.startsWith('https://') ||
|
|
value.startsWith('HTTPS://') ||
|
|
value.startsWith('HTTP://')
|
|
) {
|
|
return value;
|
|
}
|
|
|
|
return `https://${value}`;
|
|
};
|