Don't Ping if we're not logged in

This commit is contained in:
Matthias 2020-09-20 15:59:35 +02:00
parent dc2f7034e4
commit a6d4de0c66

View File

@ -83,7 +83,8 @@ export default {
},
},
actions: {
ping({ commit }) {
ping({ commit, rootState }) {
if (rootState.loggedIn) {
api
.get('/ping')
.then((result) => {
@ -91,6 +92,7 @@ export default {
commit('setIsBotOnline', result.data, { root: true });
})
.catch(console.error);
}
},
setDetailTrade({ commit }, trade: Trade) {
commit('setDetailTrade', trade);