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);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -103,7 +103,7 @@
|
||||
|
||||
<script>
|
||||
/* xeslint-disable */
|
||||
import apiMeta from "../api/apimeta";
|
||||
import api from "../api/apiutil";
|
||||
import aboutInfo from "../utils/aboutinfo";
|
||||
import lt from "../api/locale";
|
||||
export default {
|
||||
@@ -135,8 +135,8 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.clientInfo.version = aboutInfo.version;
|
||||
apiMeta
|
||||
.fetchAPIInfo()
|
||||
api
|
||||
.get("ServerInfo")
|
||||
.then(response => {
|
||||
this.serverInfo = response.data;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user