fix: api not found by default
This commit is contained in:
parent
ae0ecb9f23
commit
26213d5e8c
1 changed files with 4 additions and 0 deletions
|
@ -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://') &&
|
||||
|
|
Loading…
Reference in a new issue