diff --git a/package-lock.json b/package-lock.json index fafe136..3ed47bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@hotwax/app-version-info": "^1.0.0", "@hotwax/apps-theme": "^1.2.4", "@hotwax/dxp-components": "^1.11.0", - "@hotwax/oms-api": "^1.11.0", + "@hotwax/oms-api": "^1.13.0", "@ionic/core": "6.7.5", "@ionic/vue": "6.7.5", "@ionic/vue-router": "6.7.5", @@ -2818,9 +2818,9 @@ } }, "node_modules/@hotwax/oms-api": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@hotwax/oms-api/-/oms-api-1.11.0.tgz", - "integrity": "sha512-HQCXuADMVkQXAS9ClWFrTYNjSFP8wQuGMILEkLDh9R2YR1gNnJ4GezeZuxXQOjhxBg7zXxbdL3v5/q03P32O5g==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@hotwax/oms-api/-/oms-api-1.13.0.tgz", + "integrity": "sha512-D7bdS1XBfEu9fT23+mViC4FbyhFfg9GN95Epp/5V85Xcl8udxqOjHI9xcRMxANgrMjPNksshT1rm7F/TfEi/+g==", "dependencies": { "@types/node-json-transform": "^1.0.0", "axios": "^0.21.1", diff --git a/package.json b/package.json index d417472..d728304 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@hotwax/app-version-info": "^1.0.0", "@hotwax/apps-theme": "^1.2.4", "@hotwax/dxp-components": "^1.11.0", - "@hotwax/oms-api": "^1.11.0", + "@hotwax/oms-api": "^1.13.0", "@ionic/core": "6.7.5", "@ionic/vue": "6.7.5", "@ionic/vue-router": "6.7.5", diff --git a/src/services/UserService.ts b/src/services/UserService.ts index f636b90..3fa0470 100644 --- a/src/services/UserService.ts +++ b/src/services/UserService.ts @@ -689,8 +689,7 @@ const isRoleTypeExists = async (roleTypeId: string): Promise => { } const uploadPartyImage = async (payload: any): Promise => { - let baseURL = store.getters['user/getInstanceUrl']; - baseURL = baseURL && baseURL.startsWith('http') ? baseURL : `https://${baseURL}.hotwax.io/api/`; + const baseURL = store.getters['user/getBaseUrl']; return client({ url: 'service/uploadPartyLogoImage', method: 'POST', diff --git a/src/store/modules/user/getters.ts b/src/store/modules/user/getters.ts index dd82b9f..360466c 100644 --- a/src/store/modules/user/getters.ts +++ b/src/store/modules/user/getters.ts @@ -12,7 +12,7 @@ const getters: GetterTree = { getBaseUrl(state) { let baseURL = process.env.VUE_APP_BASE_URL; if (!baseURL) baseURL = state.instanceUrl; - return baseURL.startsWith('http') ? baseURL : `https://${baseURL}.hotwax.io/api/`; + return baseURL.startsWith('http') ? baseURL.includes('/api') ? baseURL : `${baseURL}/api/` : `https://${baseURL}.hotwax.io/api/`; }, getUserToken(state) { return state.token