This commit is contained in:
2022-02-15 20:04:41 +00:00
parent 27efdd9644
commit 07c1587628
3 changed files with 18 additions and 1 deletions

View File

@@ -269,6 +269,14 @@ export default {
};
},
APIUrl(apiPath) {
if (
window.$gz.dev &&
window.location.hostname == "localhost" &&
window.location.port == "8080"
) {
return "http://localhost:7575/api/v8.0/" + apiPath;
}
return (
window.location.protocol +
"//" +
@@ -278,6 +286,13 @@ export default {
);
},
helpUrl() {
if (
window.$gz.dev &&
window.location.hostname == "localhost" &&
window.location.port == "8080"
) {
return "http://localhost:7575/docs/";
}
return window.location.protocol + "//" + window.location.host + "/docs/";
},
/////////////////////////////
@@ -394,6 +409,7 @@ export default {
async get(route) {
try {
const that = this;
let r = await fetch(that.APIUrl(route), that.fetchGetOptions());
that.statusEx(r);
r = await that.extractBodyEx(r);