This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user