Skip to content

Commit

Permalink
Merge pull request hotwax#266 from R-Sourabh/hotwax#272-Update-oms-api
Browse files Browse the repository at this point in the history
Improved:Updated the oms-api package to resolve login issues encountered when /api is omitted from the complete URL. Additionally, implemented a check in the app to handle direct URL access.
  • Loading branch information
ymaheshwari1 authored Mar 18, 2024
2 parents d7751b5 + b6698b2 commit 2d4b425
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@hotwax/app-version-info": "^1.0.0",
"@hotwax/apps-theme": "^1.1.0",
"@hotwax/dxp-components": "^1.12.1",
"@hotwax/oms-api": "^1.10.0",
"@hotwax/oms-api": "^1.13.0",
"@ionic/core": "6.7.5",
"@ionic/vue": "6.7.5",
"@ionic/vue-router": "6.7.5",
Expand Down
2 changes: 1 addition & 1 deletion src/services/UserService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const login = async (username: string, password: string): Promise <any> => {

const checkPermission = async (payload: any): Promise <any> => {
let baseURL = store.getters['user/getInstanceUrl'];
baseURL = baseURL && baseURL.startsWith('http') ? baseURL : `https://${baseURL}.hotwax.io/api/`;
baseURL = baseURL && baseURL.startsWith('http') ? (baseURL.includes('/api') ? baseURL : `${baseURL}/api/`) : `https://${baseURL}.hotwax.io/api/`;
return client({
url: "checkPermission",
method: "post",
Expand Down

0 comments on commit 2d4b425

Please sign in to comment.