This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
/* Xeslint-disable */
|
||||
import logger from "../utils/logit";
|
||||
import store from "../store";
|
||||
|
||||
export default {
|
||||
@@ -7,7 +6,7 @@ export default {
|
||||
if (response.status >= 200 && response.status < 300) {
|
||||
return Promise.resolve(response);
|
||||
} else {
|
||||
logger.log("API error", response.statusText);
|
||||
store.commit("logItem", "API error: " + response.statusText);
|
||||
return Promise.reject(new Error(response.statusText));
|
||||
}
|
||||
},
|
||||
@@ -67,7 +66,7 @@ export default {
|
||||
window.location.hostname == "localhost" &&
|
||||
window.location.port == "8080"
|
||||
) {
|
||||
logger.log("apiutil::APIUrl -> APIURL empty setting to dev. mode");
|
||||
store.commit("logItem", "apiutil::APIUrl -> setting to dev. mode");
|
||||
store.commit("setAPIURL", "http://localhost:7575/api/v8.0/");
|
||||
} else {
|
||||
//production location <protocol>//<hostname>:<port>/
|
||||
@@ -75,9 +74,9 @@ export default {
|
||||
"setAPIURL",
|
||||
window.location.protocol + "//" + window.location.host + "/api/v8.0/"
|
||||
);
|
||||
logger.log(
|
||||
"apiutil::APIUrl -> APIURL empty using: ",
|
||||
store.state.apiUrl
|
||||
store.commit(
|
||||
"logItem",
|
||||
"apiutil::APIUrl -> setting to: " + store.state.apiUrl
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user