This commit is contained in:
2018-11-13 21:59:51 +00:00
parent d14a8bb6c1
commit 86b2938879
7 changed files with 28 additions and 25 deletions

View File

@@ -12,16 +12,20 @@ export default new Vuex.Store({
navItems: []
},
mutations: {
authenticated(state, data) {
setAuthentication(state, data) {
// mutate state
state.authenticated = data.authenticated;
state.userId = data.userId;
state.roles = data.roles;
},
notAuthenticated(state) {
clearAuthentication(state) {
state.authenticated = false;
state.userId = 0;
state.roles = 0;
state.navItems = [];
},
addNavItem(state, data) {
state.navItems.push(data);
}
},
actions: {}