From d2b8c5ade49f2e531a3a79f81554d74ddb895f05 Mon Sep 17 00:00:00 2001 From: Guamss Date: Thu, 11 Dec 2025 22:40:02 +0100 Subject: [PATCH] update du access token et update des cards --- src/App.vue | 28 ++++++-- src/components/Home.vue | 79 +++++++++++++++++--- src/services/authentication.service.ts | 99 +++++++++++++++++++++----- src/utils.ts | 11 +++ 4 files changed, 184 insertions(+), 33 deletions(-) create mode 100644 src/utils.ts diff --git a/src/App.vue b/src/App.vue index 94e583a..1ec1924 100644 --- a/src/App.vue +++ b/src/App.vue @@ -11,11 +11,13 @@ const { isAuthenticated, logout } = useAuth(); const toastService = useToast(); const authenticationService = new AuthenticationService(); +const { login } = useAuth(); + const fetchUser = async () => { if (isAuthenticated.value) { try { authenticatedUser.value = await authenticationService.findMe(); - } catch (error) { + } catch (error: any) { console.error(error); } } else { @@ -68,6 +70,11 @@ function handleLogout() { diff --git a/src/components/Home.vue b/src/components/Home.vue index 736fb6f..11fd90b 100644 --- a/src/components/Home.vue +++ b/src/components/Home.vue @@ -1,6 +1,7 @@