websocket implementation

This commit is contained in:
Čarodej
2022-03-09 07:40:05 +01:00
parent 2a0b01e888
commit 8495ed5422
15 changed files with 1816 additions and 226 deletions

View File

@@ -10,7 +10,7 @@ const defaultState = {
}
const actions = {
getAppData: ({ commit, getters }) => {
getAppData: ({ commit, getters, dispatch }) => {
return new Promise((resolve, reject) => {
axios
.get(getters.api + '/user' + getters.sorting.URI)
@@ -18,6 +18,10 @@ const actions = {
resolve(response)
commit('RETRIEVE_USER', response.data)
if (! getters.isRunningConnection) {
dispatch('runConnection')
}
})
.catch((error) => {
reject(error)