Skip to content

Commit

Permalink
Merge pull request #190 from ymaheshwari1/fix/login-localhost
Browse files Browse the repository at this point in the history
Implemented: support to login into the app using full url
  • Loading branch information
ymaheshwari1 authored Apr 15, 2024
2 parents 55a0cf7 + 4079fe0 commit 6ae7528
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const api = async (customConfig: any) => {
}

const baseURL = store.getters["user/getInstanceUrl"];
if (baseURL) config.baseURL = `https://${baseURL}.hotwax.io/rest/s1/order-routing/`;
if (baseURL) config.baseURL = baseURL.startsWith('http') ? baseURL.includes('/rest/s1/order-routing') ? baseURL : `${baseURL}/rest/s1/order-routing/` : `https://${baseURL}.hotwax.io/rest/s1/order-routing/`;
if(customConfig.cache) config.adapter = axiosCache.adapter;
const networkStatus = await OfflineHelper.getNetworkStatus();
if (customConfig.queue && !networkStatus.connected) {
Expand Down

0 comments on commit 6ae7528

Please sign in to comment.