added correct login rewrite

This commit is contained in:
Grzegorz Leoniec 2018-11-26 11:19:45 +01:00
parent 9604dffb40
commit b3187d7f88

View File

@ -92,7 +92,7 @@ export default {
try {
await this.$store.dispatch('auth/login', { ...this.form })
this.$toast.success('You are logged in!')
this.$router.replace('/')
this.$router.replace(this.$route.query.path || '/')
} catch (err) {
this.$toast.error(err.message)
}