From 70658e4fb98b1582b55f524068623e8566d5acb6 Mon Sep 17 00:00:00 2001
From: Mohamed Maoulainine Maoulainine
 <Mohamed_Maoulainine.Maoulainine@enseirb-matmeca.fr>
Date: Sat, 12 Apr 2025 22:22:22 +0200
Subject: [PATCH] fix: fixed an issue with the server by adding the dependency
 of jwt

---
 front/MyINPulse-front/package.json                      | 3 ++-
 front/MyINPulse-front/src/components/LoginComponent.vue | 6 ++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/front/MyINPulse-front/package.json b/front/MyINPulse-front/package.json
index ff46180..57ec628 100644
--- a/front/MyINPulse-front/package.json
+++ b/front/MyINPulse-front/package.json
@@ -18,7 +18,8 @@
     "pinia": "^2.3.1",
     "pinia-plugin-persistedstate": "^4.2.0",
     "vue": "^3.5.13",
-    "vue-router": "^4.5.0"
+    "vue-router": "^4.5.0",
+    "jwt-decode": "^4.0.0"
   },
   "devDependencies": {
     "@playwright/test": "^1.49.1",
diff --git a/front/MyINPulse-front/src/components/LoginComponent.vue b/front/MyINPulse-front/src/components/LoginComponent.vue
index ef48942..b752fe3 100644
--- a/front/MyINPulse-front/src/components/LoginComponent.vue
+++ b/front/MyINPulse-front/src/components/LoginComponent.vue
@@ -1,7 +1,7 @@
 <script lang="ts" setup>
-import { onMounted } from "vue";
+import { onMounted, ref } from "vue";
 import { useRouter } from "vue-router";
-import {jwtDecode} from "jwt-decode";
+import {jwtDecode} from "jwt-decode"; // i hope this doesn't break the code later
 import { store } from "../main.ts";
 import { callApi } from "@/services/api.ts";
 
@@ -13,6 +13,8 @@ type TokenPayload = {
   };
 };
 
+const customRequest = ref('');
+
 onMounted(() => {
   if (store.authenticated && store.user.token) {
     try {