refactor(vtiger-crm): get full url for base url

This commit is contained in:
Rıdvan Akca
2024-05-07 16:20:53 +02:00
parent 43281bcbfe
commit c6a770c690
3 changed files with 7 additions and 8 deletions

View File

@@ -26,15 +26,14 @@ export default {
clickToCopy: false,
},
{
key: 'domain',
label: 'Domain',
key: 'instanceUrl',
label: 'Instance URL',
type: 'string',
required: true,
readOnly: false,
value: null,
placeholder: null,
description:
'For example: acmeco.od1 if your dashboard url is https://acmeco.od1.vtiger.com. (Unfortunately, we are not able to offer support for self-hosted instances at this moment.)',
description: '',
clickToCopy: false,
},
],

View File

@@ -1,7 +1,7 @@
const setBaseUrl = ($, requestConfig) => {
const domain = $.auth.data.domain;
if (domain) {
requestConfig.baseURL = `https://${domain}.vtiger.com`;
const instanceUrl = $.auth.data.instanceUrl;
if (instanceUrl) {
requestConfig.baseURL = instanceUrl;
}
return requestConfig;