This commit is contained in:
@@ -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: {}
|
||||
|
||||
Reference in New Issue
Block a user