Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
fix: user component
Browse files Browse the repository at this point in the history
  • Loading branch information
tassiluca committed Jan 30, 2024
1 parent 6806dde commit a028207
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/views/RegisterView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Form from '@/components/forms/FormComponent.vue'
import FormInput from '@/components/forms/FormInputComponent.vue'
import { useForm } from 'vee-validate'
import * as yup from 'yup'
import {type UserCreation, useRegisterStore} from "@/stores/user";
import {type UserCreation, useUserStore} from "@/stores/user";
const response = ref({})
Expand Down Expand Up @@ -36,7 +36,7 @@ function onSubmit() {
secondName: secondName.value,
}
useRegisterStore().registration(data)
useUserStore().registration(data)
.then(() => { response.value = {success: true, msg: "User created successfully"}})
.catch((e) => { response.value = {success: false, msg: "Can't create user"}; });
}
Expand Down Expand Up @@ -97,7 +97,7 @@ const properties: {

<template>
<div class="container">
<PageTitle title="Create Election" />
<PageTitle title="User registration" />
<Form @submit="onSubmit" :response="response" submit-btn-name="Create an user">
<template v-slot:body>
<div class="col" v-for="prop in Object.keys(properties)" :key="prop">
Expand Down

0 comments on commit a028207

Please sign in to comment.