Skip to content

Commit

Permalink
fix: get apiVersion from loginConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
tomzemp committed Mar 5, 2024
1 parent 4656a3e commit 8d0ca2c
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions adapter/src/components/ServerVersionProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,22 @@ export const ServerVersionProvider = ({

// version is not currently available, minimum for login app
if (loginApp) {
setSystemInfoState({
loading: false,
error: undefined,
systemInfo: { version: '2.41' },
})
const requestLogin = get(`${baseUrl}/api/loginConfig`)
requestLogin
.then((loginConfig) => {
setSystemInfoState({
loading: false,
error: undefined,
systemInfo: { version: loginConfig.apiVersion },
})
})
.catch((e) => {
setSystemInfoState({
loading: false,
error: e,
systemInfo: undefined,
})
})
return
}
const request = get(`${baseUrl}/api/system/info`)
Expand Down

0 comments on commit 8d0ca2c

Please sign in to comment.