This commit is contained in:
2019-01-04 21:45:46 +00:00
parent 5e13a107be
commit c86dd91d33
7 changed files with 16 additions and 41 deletions

View File

@@ -0,0 +1,5 @@
export default {
version: "8.0.0-alpha.1",
copyright:
"Copyright © 1999-2018, Ground Zero Tech-Works Inc. All Rights Reserved"
};

View File

@@ -160,7 +160,7 @@ export default {
);
},
get(route) {
var that=this;
var that = this;
//debugger;
return new Promise(function(resolve, reject) {
//debugger;
@@ -169,12 +169,12 @@ export default {
.then(that.json)
.then(response => {
//For now, assuming that all returns that make it here have either an error or a data object attached to them
//debugger;
// debugger;
resolve(response);
})
.catch(function(error) {
//fundamental error, can't proceed with this call
// debugger;
//debugger;
var errorMessage =
"API error: GET route =" + route + ", message =" + error.message;
store.commit("logItem", errorMessage);
@@ -183,4 +183,6 @@ export default {
});
});
}
//new functions above here
};

View File

@@ -1,29 +0,0 @@
/* xeslint-disable */
import apiUtil from "./apiutil";
export default {
fetch(route, listOptions) {
// listOptions;
// var futureWithSortExampleListOptions = {
// offset: 5,
// limit: 5,
// sortBy: "name",
// descending: false
// };
// exampleListOptions;
var listUrl = route + "?" + apiUtil.buildQuery(listOptions);
return new Promise(function(resolve, reject) {
fetch(apiUtil.APIUrl(listUrl), apiUtil.fetchGetOptions())
.then(apiUtil.status)
.then(apiUtil.json)
.then(response => {
resolve(response);
})
.catch(function(error) {
reject(error);
});
});
}
};