This commit is contained in:
@@ -6,11 +6,22 @@ Vue.use(Vuex);
|
||||
export default new Vuex.Store({
|
||||
state: {
|
||||
authenticated: false,
|
||||
mockAccount: {
|
||||
username: "manager",
|
||||
password: "letmein"
|
||||
apiUrl: "http://localhost:7575/api/v8.0/",
|
||||
userId: 0,
|
||||
roles: 0
|
||||
},
|
||||
mutations: {
|
||||
authenticated(state, data) {
|
||||
// mutate state
|
||||
state.authenticated = data.authenticated;
|
||||
state.userId = data.userId;
|
||||
state.roles = data.roles;
|
||||
},
|
||||
notAuthenticated(state) {
|
||||
state.authenticated = false;
|
||||
state.userId = 0;
|
||||
state.roles = 0;
|
||||
}
|
||||
},
|
||||
mutations: {},
|
||||
actions: {}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user