refactor: login redirect
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { router } from '@KTXC/router';
|
|
||||||
import { authenticationService } from '@KTXC/services/authenticationService';
|
import { authenticationService } from '@KTXC/services/authenticationService';
|
||||||
import { userService } from '@KTXC/services/user/userService';
|
import { userService } from '@KTXC/services/user/userService';
|
||||||
import type { AuthenticatedUser } from '@KTXC/types/authenticationTypes';
|
import type { AuthenticatedUser } from '@KTXC/types/authenticationTypes';
|
||||||
@@ -80,7 +79,7 @@ export const useUserStore = defineStore('userStore', () => {
|
|||||||
clearAuth();
|
clearAuth();
|
||||||
clearProfile();
|
clearProfile();
|
||||||
clearSettings();
|
clearSettings();
|
||||||
router.push('/login');
|
window.location.href = '/login';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user