From 0fc53dc3674079f090bda35bcbbfd6aa3b68d806 Mon Sep 17 00:00:00 2001 From: vekaste <vekaste@stud.ntnu.no> Date: Wed, 1 May 2024 15:58:18 +0200 Subject: [PATCH] feat: SuitableChallenges now creates account ands redirects --- .../ConfigurationSteps/SuitableChallenges.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/Configuration/ConfigurationSteps/SuitableChallenges.vue b/src/components/Configuration/ConfigurationSteps/SuitableChallenges.vue index 439d653..44c9c45 100644 --- a/src/components/Configuration/ConfigurationSteps/SuitableChallenges.vue +++ b/src/components/Configuration/ConfigurationSteps/SuitableChallenges.vue @@ -76,7 +76,7 @@ const signUpUser = async () => { role: response.role, }); useUserInfoStore().resetPassword() - await router.push({ name: 'home' }); + await router.push("/first-saving-goal") } catch (error) { errorMsg.value = handleUnknownError(error); @@ -89,7 +89,11 @@ const handleSubmit = () => { } useConfigurationStore().setChallenges(chosenChallenges.value) console.log(useConfigurationStore().getChallenges) - router.push("/first-saving-goal") + try { + signUpUser() + } catch (e) { + console.log(e) + } } </script> -- GitLab