Improvement of logout. Added Sacrital Service. Added website link for event places and direct link to other websites in worship overview

This commit is contained in:
Torsten Schulz
2024-09-06 16:34:17 +02:00
parent a869f2d16a
commit 5c6cfa41ab
14 changed files with 139 additions and 32 deletions

View File

@@ -1,6 +1,6 @@
import { createStore } from 'vuex';
import axios from 'axios';
import router from '../router';
import router from '../router';
let user = [];
try {
@@ -94,8 +94,14 @@ export default createStore({
login({ commit }, { user, token }) {
commit('setLogin', { user, token });
},
logout({ commit }) {
commit('logout');
async logout({ commit }) {
try {
await axios.post('/auth/logout');
} catch (error) {
console.error('Fehler beim Logout:', error);
} finally {
commit('logout');
}
}
},
getters: {