refactor(pipedrive): set baseUrl in a seperate file

This commit is contained in:
Rıdvan Akca
2023-10-20 18:48:58 +03:00
committed by Ali BARIN
parent 3a638220af
commit 94e64676af
12 changed files with 32 additions and 26 deletions

View File

@@ -0,0 +1,12 @@
import { TBeforeRequest } from '@automatisch/types';
const setBaseUrl: TBeforeRequest = ($, requestConfig) => {
const { apiDomain } = $.auth.data;
if (apiDomain) {
requestConfig.baseURL = apiDomain as string;
}
return requestConfig;
};
export default setBaseUrl;