1
0

fix: api not found by default

This commit is contained in:
kolaente
2021-11-16 22:34:08 +01:00
parent ae0ecb9f23
commit 26213d5e8c

View File

@ -7,6 +7,10 @@ export const ERROR_NO_API_URL = 'noApiUrlProvided'
const updateConfig = () => store.dispatch('config/update')
export const checkAndSetApiUrl = (url: string): Promise<string> => {
if(url.startsWith('/')) {
url = window.location.host + url
}
// Check if the url has an http prefix
if (
!url.startsWith('http://') &&