mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-09 13:55:01 +02:00
Remove async/await
This commit is contained in:
@ -46,19 +46,21 @@
|
||||
}
|
||||
},
|
||||
methods : {
|
||||
async handleSubmit(e){
|
||||
handleSubmit(e){
|
||||
e.preventDefault()
|
||||
|
||||
this.validationErrors = {}
|
||||
|
||||
try {
|
||||
const { data } = await axios.post('/api/password/email', {
|
||||
email: this.email
|
||||
})
|
||||
axios.post('/api/password/email', {
|
||||
email: this.email
|
||||
})
|
||||
.then(response => {
|
||||
|
||||
this.response = response.data.status
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
|
||||
this.response = data.status
|
||||
}
|
||||
catch (error) {
|
||||
if( error.response.data.errors ) {
|
||||
this.validationErrors = error.response.data.errors
|
||||
}
|
||||
@ -68,7 +70,9 @@
|
||||
else {
|
||||
this.$router.push({ name: 'genericError', params: { err: error.response } });
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user