diff options
Diffstat (limited to 'src/store')
-rw-r--r-- | src/store/modules/Authentication/AuthenticanStore.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/store/modules/Authentication/AuthenticanStore.js b/src/store/modules/Authentication/AuthenticanStore.js index 975f258b..d64c7308 100644 --- a/src/store/modules/Authentication/AuthenticanStore.js +++ b/src/store/modules/Authentication/AuthenticanStore.js @@ -17,8 +17,8 @@ const AuthenticationStore = { state.authError = false; state.cookie = Cookies.get('XSRF-TOKEN'); }, - authError(state) { - state.authError = true; + authError(state, authError = true) { + state.authError = authError; }, logout() { Cookies.remove('XSRF-TOKEN'); @@ -26,6 +26,7 @@ const AuthenticationStore = { }, actions: { login({ commit }, auth) { + commit('authError', false); return api .post('/login', { data: auth }) .then(() => commit('authSuccess')) |