Set $matrix variable inside Vuex store
This commit is contained in:
parent
96ef4885d6
commit
fba172d5cf
2 changed files with 6 additions and 3 deletions
|
|
@ -104,7 +104,7 @@ const store = createStore({
|
|||
},
|
||||
actions: {
|
||||
login({ commit }, { user, registrationFlowHandler }) {
|
||||
return this._vm.$matrix.login(user, registrationFlowHandler).then(
|
||||
return this.$matrix.login(user, registrationFlowHandler).then(
|
||||
user => {
|
||||
commit('loginSuccess', user);
|
||||
return Promise.resolve(user);
|
||||
|
|
@ -116,7 +116,7 @@ const store = createStore({
|
|||
);
|
||||
},
|
||||
createUser({ commit }, { user, registrationFlowHandler }) {
|
||||
return this._vm.$matrix.login(user, registrationFlowHandler, true).then(
|
||||
return this.$matrix.login(user, registrationFlowHandler, true).then(
|
||||
user => {
|
||||
commit('loginSuccess', user);
|
||||
return Promise.resolve(user);
|
||||
|
|
@ -128,7 +128,7 @@ const store = createStore({
|
|||
);
|
||||
},
|
||||
logout({ commit }) {
|
||||
this._vm.$matrix.logout();
|
||||
this.$matrix.logout();
|
||||
commit('logout');
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue