Add redirection when form succeeds
This commit is contained in:
parent
5d8048bc1a
commit
991452398a
@ -66,6 +66,7 @@
|
||||
.then(response => {
|
||||
this.setToken({token: response.data.token})
|
||||
this.setUser({username: this.form.username})
|
||||
this.$router.push('/')
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error)
|
||||
|
||||
@ -117,7 +117,10 @@
|
||||
email: this.form.email,
|
||||
password: this.form.password
|
||||
})
|
||||
.then(response => console.log(response.data))
|
||||
.then(response => {
|
||||
console.log(response.data);
|
||||
this.$router.push('/signin')
|
||||
})
|
||||
.catch(error => {
|
||||
if (error.response && error.response.status === 409)
|
||||
this.exists = true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user