better error messages for the loading-screen (#87)

better error messages for the loading-screen

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2020-05-30 16:22:07 +02:00 committed by GitHub
parent 68790dbe1b
commit dbc592e6d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 36 additions and 14 deletions

View file

@ -3,7 +3,7 @@ import { BackendConfigState } from '../redux/backend-config/types'
import { expectResponseCode, getBackendUrl } from '../utils/apiUtils'
export const getBackendConfig = async (): Promise<BackendConfigState> => {
const response = await fetch(getBackendUrl() + '/backend-config.json')
const response = await fetch(getBackendUrl() + '/config')
expectResponseCode(response)
return await response.json() as Promise<BackendConfigState>
}