Go to friends timeline on login.

This commit is contained in:
Roger Braun 2016-10-30 14:25:18 +01:00
parent 500b704c0f
commit a7ce51b4b0
2 changed files with 4 additions and 2 deletions

View File

@ -7,7 +7,9 @@ const LoginForm = {
}, },
methods: { methods: {
submit () { submit () {
this.$store.dispatch('loginUser', this.user) this.$store.dispatch('loginUser', this.user).then(() => {
this.$router.push('/main/friends')
})
} }
} }
} }

View File

@ -21,7 +21,7 @@ const users = {
loginUser (store, userCredentials) { loginUser (store, userCredentials) {
const commit = store.commit const commit = store.commit
commit('beginLogin') commit('beginLogin')
apiService.verifyCredentials(userCredentials) return apiService.verifyCredentials(userCredentials)
.then((response) => { .then((response) => {
if (response.ok) { if (response.ok) {
response.json() response.json()