1
0
mirror of https://github.com/donaldzou/WGDashboard.git synced 2024-11-22 15:20:09 +01:00
This commit is contained in:
Donald Zou 2024-08-14 12:31:37 -04:00
parent 4f648aff52
commit bd7139827b
2 changed files with 5 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -19,6 +19,10 @@ const getUrl = (url) => {
if (apiKey){ if (apiKey){
return `${apiKey.host}${url}` return `${apiKey.host}${url}`
} }
console.log("URL fetching: ", import.meta.env.MODE === 'development' ? url
: `${window.location.protocol}//${window.location.host}${window.location.pathname}${url}`)
return import.meta.env.MODE === 'development' ? url return import.meta.env.MODE === 'development' ? url
: `${window.location.protocol}//${window.location.host}${window.location.pathname}${url}` : `${window.location.protocol}//${window.location.host}${window.location.pathname}${url}`
} }