File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11/* eslint-disable import/prefer-default-export */
22import Axios from 'axios' ;
3+ import router from '../router' ;
4+ import store from '../store' ;
35
46export const logOut = async ( ) => {
7+ await store . dispatch ( 'logout' ) ;
8+ await router . push ( '/accounts/signin' ) ;
59 await Axios . post ( '/auth/logout' , {
610 access_token : localStorage . getItem ( process . env . VUE_APP_ACCESS_TOKEN ) ,
711 refresh_token : localStorage . getItem ( process . env . VUE_APP_REFRESH_TOKEN ) ,
@@ -10,6 +14,4 @@ export const logOut = async () => {
1014 localStorage . removeItem ( process . env . VUE_APP_REFRESH_TOKEN ) ;
1115 localStorage . removeItem ( process . env . VUE_APP_VUEX_PERSISTED_STATE ) ;
1216 localStorage . removeItem ( process . env . VUE_APP_SECURE_LS_METADATA ) ;
13- await this . $store . dispatch ( 'logout' ) ;
14- await this . $router . push ( '/accounts/signin' ) ;
1517} ;
You can’t perform that action at this time.
0 commit comments