feature implement login final changes
This commit is contained in:
@@ -66,14 +66,13 @@ const formData = ref({
|
||||
const handleSubmit = async () => {
|
||||
const promise = authStore.login(formData.value)
|
||||
toast.promise(promise, {
|
||||
loading: 'Calling API',
|
||||
success: (user) => {
|
||||
router.push('/')
|
||||
return `Login Successful - ${user.name}`
|
||||
},
|
||||
error: (error) =>
|
||||
error.response?.data?.message
|
||||
loading: 'Calling API',
|
||||
success: (user) => {
|
||||
router.push('/')
|
||||
return `Login Successful - ${user.name}`
|
||||
},
|
||||
error: (error) =>
|
||||
error.response?.data?.message
|
||||
})
|
||||
router.push('/')
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user