From 69924ba8555ef0707859cf89e4c8ca0708a27a89 Mon Sep 17 00:00:00 2001 From: Sean Luthjohn Date: Fri, 6 Jul 2018 11:37:03 -0500 Subject: [PATCH] Code was duplicated --- src/components/Login.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/Login.vue b/src/components/Login.vue index 0e5134a..e755ff3 100644 --- a/src/components/Login.vue +++ b/src/components/Login.vue @@ -55,11 +55,8 @@ export default { }, methods: { signIn() { - const email = this.email; - const pwd = this.password; - firebase.auth().signInWithEmailAndPassword(email, pwd).then((user) => { - localStorage.user = JSON.stringify(user); - this.$store.dispatch('signUserIn', { email: this.email, password: this.password }); + this.$store.dispatch('signUserIn', { email: this.email, password: this.password }) + .then(() => { this.$store.dispatch('initializeDB'); this.$router.replace('overview'); }, (err) => {