From 1f27439429c170973e5399bd560f318241abdba9 Mon Sep 17 00:00:00 2001
From: Jens Christian Aanestad <jenscaa@stud.ntnu.no>
Date: Wed, 24 Apr 2024 16:29:26 +0200
Subject: [PATCH] Bug/Fixed configuration error when choosing challenges

---
 .../ConfigurationSteps/SuitableChallenges.vue             | 8 +++++---
 src/components/Login/LoginForm.vue                        | 3 +++
 src/views/BudgetView.vue                                  | 1 +
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/components/Configuration/ConfigurationSteps/SuitableChallenges.vue b/src/components/Configuration/ConfigurationSteps/SuitableChallenges.vue
index ef0d093..a81fa41 100644
--- a/src/components/Configuration/ConfigurationSteps/SuitableChallenges.vue
+++ b/src/components/Configuration/ConfigurationSteps/SuitableChallenges.vue
@@ -64,13 +64,15 @@ const onClick = async () => {
      */
 
     const signUpPayLoad = {
-      "commitment": useConfigurationStore().getCommitment,
-      "experience": useConfigurationStore().getExperience,
-      "challenges": useConfigurationStore().getChallenges,
       "firstName": useUserInfoStore().getFirstName,
       "lastName": useUserInfoStore().getLastname,
       "email": useUserInfoStore().getEmail,
       "password": useUserInfoStore().getPassword,
+      "configuration": {
+        "commitment": useConfigurationStore().getCommitment,
+        "experience": useConfigurationStore().getExperience,
+        "challenges": useConfigurationStore().getChallenges
+      }
     };
 
     let response = await AuthenticationService.signup({ requestBody: signUpPayLoad });
diff --git a/src/components/Login/LoginForm.vue b/src/components/Login/LoginForm.vue
index 8e502fa..51d0c18 100644
--- a/src/components/Login/LoginForm.vue
+++ b/src/components/Login/LoginForm.vue
@@ -62,6 +62,9 @@ const handleSubmit = async () => {
       email: emailRef.value,
       role: response.role,
     });
+
+    console.log()
+
     await router.push({ name: 'home' });
   } catch (error: any) {
     errorMsg.value = handleUnknownError(error);
diff --git a/src/views/BudgetView.vue b/src/views/BudgetView.vue
index 65265d0..0297c10 100644
--- a/src/views/BudgetView.vue
+++ b/src/views/BudgetView.vue
@@ -323,5 +323,6 @@ i {
   overflow-y: auto;
   overflow-x: hidden;
   max-height: 100vh;
+}
 
 </style>
\ No newline at end of file
-- 
GitLab