This commit is contained in:
5
ayanova/src/api/aboutinfo.js
Normal file
5
ayanova/src/api/aboutinfo.js
Normal 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"
|
||||
};
|
||||
@@ -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
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user