This commit is contained in:
2020-02-25 23:32:05 +00:00
parent 5482ef30cd
commit 9dda20a7c2
7 changed files with 6 additions and 77 deletions

View File

@@ -27,6 +27,7 @@ function devShowUnknownError(error) {
console.log("gzapi::devShowUnknownError, error is:");
// eslint-disable-next-line
console.log(error);
console.trace();
debugger;
window.$gz.eventBus.$emit(
@@ -284,19 +285,12 @@ export default {
// GET DATA FROM API SERVER
//
get(route) {
//console.log("gzapi::get(" + route + ")");
var that = this;
return new Promise(function getDataFromServer(resolve, reject) {
fetch(that.APIUrl(route), that.fetchGetOptions())
.then(that.status)
.then(that.json)
.then(response => {
//KEEP this for diagnostics and testing to put a delay on fetches to check if my promise-fu is on point
// setTimeout(() => {
// console.log("gzapi::get->Calling resolve now for " + route);
// resolve(response); // (**)
// }, 2000);
resolve(response);
})
.catch(function handleGetError(error) {