mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 02:11:57 +00:00
Don't Ping if we're not logged in
This commit is contained in:
parent
dc2f7034e4
commit
a6d4de0c66
|
@ -83,14 +83,16 @@ export default {
|
|||
},
|
||||
},
|
||||
actions: {
|
||||
ping({ commit }) {
|
||||
api
|
||||
.get('/ping')
|
||||
.then((result) => {
|
||||
commit('setPing', result.data, { root: true });
|
||||
commit('setIsBotOnline', result.data, { root: true });
|
||||
})
|
||||
.catch(console.error);
|
||||
ping({ commit, rootState }) {
|
||||
if (rootState.loggedIn) {
|
||||
api
|
||||
.get('/ping')
|
||||
.then((result) => {
|
||||
commit('setPing', result.data, { root: true });
|
||||
commit('setIsBotOnline', result.data, { root: true });
|
||||
})
|
||||
.catch(console.error);
|
||||
}
|
||||
},
|
||||
setDetailTrade({ commit }, trade: Trade) {
|
||||
commit('setDetailTrade', trade);
|
||||
|
|
Loading…
Reference in New Issue
Block a user