From 01f062211afa868b2de744782ce82038426817ef Mon Sep 17 00:00:00 2001 From: Pierre Tellier Date: Mon, 21 Apr 2025 19:16:42 +0200 Subject: [PATCH 1/2] fix: awful fix but works for now ? --- front/MyINPulse-front/src/plugins/authStore.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/front/MyINPulse-front/src/plugins/authStore.ts b/front/MyINPulse-front/src/plugins/authStore.ts index eb11635..40591d8 100644 --- a/front/MyINPulse-front/src/plugins/authStore.ts +++ b/front/MyINPulse-front/src/plugins/authStore.ts @@ -2,11 +2,9 @@ import { useAuthStore } from "@/stores/authStore.ts"; import keycloakService from "@/services/keycloak"; -import type { Pinia } from "pinia"; -import type { AppConfig } from "vue"; // Setup auth store as a plugin so it can be accessed globally in our FE const authStorePlugin = { - install(app: AppConfig, option: Pinia) { + install(app: unknown, option: unknown) { const store = useAuthStore(option.pinia); app.config.globalProperties.$store = store; keycloakService.CallInitStore(store); From 08706af6c2b1dedecf0daa4d92d792511f864861 Mon Sep 17 00:00:00 2001 From: Pierre Tellier Date: Mon, 21 Apr 2025 19:24:38 +0200 Subject: [PATCH 2/2] fix: proper fix --- front/MyINPulse-front/src/plugins/authStore.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/front/MyINPulse-front/src/plugins/authStore.ts b/front/MyINPulse-front/src/plugins/authStore.ts index 40591d8..e844126 100644 --- a/front/MyINPulse-front/src/plugins/authStore.ts +++ b/front/MyINPulse-front/src/plugins/authStore.ts @@ -2,9 +2,11 @@ import { useAuthStore } from "@/stores/authStore.ts"; import keycloakService from "@/services/keycloak"; +import type { Pinia } from "pinia"; +import type { App } from "vue"; // Setup auth store as a plugin so it can be accessed globally in our FE const authStorePlugin = { - install(app: unknown, option: unknown) { + install(app: App, option: { pinia: Pinia }) { const store = useAuthStore(option.pinia); app.config.globalProperties.$store = store; keycloakService.CallInitStore(store);