diff --git a/docu/login_server.api.md b/docu/login_server.api.md index 072cf89ab..0cf3915ca 100644 --- a/docu/login_server.api.md +++ b/docu/login_server.api.md @@ -314,7 +314,7 @@ In case of success returns: - `registerDirect`: code generated by register for check email - `register`: code generated by auto-register via elopage for check email - `info`: can contain additional info strings - - "user hasn't password": if user hasn't set a password yet (for example if he was registered via elopage) + - "user has no password": if user hasn't set a password yet (for example if he was registered via elopage) - "email already activated": if email was already checked - `user`: contain user object - `created`: timestamp on which account was created diff --git a/frontend/src/components/SidebarPlugin/SideBar.vue b/frontend/src/components/SidebarPlugin/SideBar.vue index 0063e6e58..42d1e5fb1 100755 --- a/frontend/src/components/SidebarPlugin/SideBar.vue +++ b/frontend/src/components/SidebarPlugin/SideBar.vue @@ -102,8 +102,7 @@ export default { this.$sidebar.displaySidebar(true) }, logout() { - this.$store.dispatch('logout') - this.$router.push('/login') + this.$emit('logout') }, }, } diff --git a/frontend/src/store/store.js b/frontend/src/store/store.js index 357205847..82c2e6992 100644 --- a/frontend/src/store/store.js +++ b/frontend/src/store/store.js @@ -1,7 +1,6 @@ import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) -import loginAPI from '../apis/loginAPI' import communityAPI from '../apis/communityAPI' import createPersistedState from 'vuex-persistedstate' @@ -49,23 +48,19 @@ export const store = new Vuex.Store({ }, }, actions: { - login: async ({ dispatch, commit }, data) => { + login: ({ dispatch, commit }, data) => { commit('session_id', data.session_id) commit('email', data.email) }, - passwordReset: async (data) => {}, - schoepfen: async (data) => { + passwordReset: (data) => {}, + schoepfen: (data) => { // http://localhost/transaction-creations/ajaxCreate }, - createUser: async ({ commit, dispatch }, data) => { + createUser: ({ commit, dispatch }, data) => { commit('session_id', data.session_id) commit('email', data.email) }, - logout: async ({ commit, state }) => { - if (state.session_id) { - const result = await loginAPI.logout(state.session_id) - // The result can be error, but thats ok with us - } + logout: ({ commit, state }) => { commit('session_id', null) commit('email', null) sessionStorage.clear() diff --git a/frontend/src/views/Layout/DashboardLayout_gdd.vue b/frontend/src/views/Layout/DashboardLayout_gdd.vue index ec2fc1352..341f63ce3 100755 --- a/frontend/src/views/Layout/DashboardLayout_gdd.vue +++ b/frontend/src/views/Layout/DashboardLayout_gdd.vue @@ -1,7 +1,7 @@