This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
/* xeslint-disable */
|
||||
import apiUtil from "./apiutil";
|
||||
|
||||
export default {
|
||||
fetchAPIInfo() {
|
||||
return new Promise(function(resolve, reject) {
|
||||
//step 2: get it
|
||||
fetch(apiUtil.APIUrl("ServerInfo"), apiUtil.fetchGetOptions())
|
||||
.then(apiUtil.status)
|
||||
.then(apiUtil.json)
|
||||
.then(response => {
|
||||
resolve(response);
|
||||
})
|
||||
.catch(function(error) {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -179,7 +179,6 @@ export default {
|
||||
"API error: GET route =" + route + ", message =" + error.message;
|
||||
store.commit("logItem", errorMessage);
|
||||
alert("Error: " + errorMessage);
|
||||
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
/* xeslint-disable */
|
||||
import apiUtil from "./apiutil";
|
||||
import store from "../store";
|
||||
export default {
|
||||
get(route) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
fetch(apiUtil.APIUrl(route), apiUtil.fetchGetOptions())
|
||||
.then(apiUtil.status)
|
||||
.then(apiUtil.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;
|
||||
resolve(response);
|
||||
})
|
||||
.catch(function(error) {
|
||||
//fundamental error, can't proceed with this call
|
||||
// debugger;
|
||||
var errorMessage =
|
||||
"API error: GET route =" + route + ", message =" + error.message;
|
||||
store.commit("logItem", errorMessage);
|
||||
alert("Error: " + errorMessage);
|
||||
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user