修复UI不刷新的bug

This commit is contained in:
Peng-YM
2020-12-09 09:50:55 +08:00
parent bb8bac760e
commit 64709b6610
3 changed files with 22 additions and 12 deletions

View File

@@ -17,7 +17,6 @@ const store = new Vuex.Store({
collections: {},
artifacts: {},
env: {},
settings: {}
},
@@ -70,6 +69,11 @@ const store = new Vuex.Store({
state.env = resp.data;
})
},
async FETCH_SETTINGS({state}) {
return axios.get("/settings").then(resp => {
state.settings = resp.data;
});
},
// update subscriptions
async UPDATE_SUBSCRIPTION({dispatch}, {name, sub}) {
return axios.patch(`/sub/${name}`, sub).then(() => {