Set $matrix variable inside Vuex store

This commit is contained in:
N-Pex 2025-05-12 12:39:22 +02:00
parent 96ef4885d6
commit fba172d5cf
2 changed files with 6 additions and 3 deletions

View file

@ -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');
},
},