fix: api not found by default
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2021-11-16 22:34:08 +01:00
parent ae0ecb9f23
commit 26213d5e8c
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 4 additions and 0 deletions

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://') &&