diff --git a/.gitignore b/.gitignore index 6f8b86103..9ac504227 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ erl_crash.dump /config/*.secret.exs .env.production +.env setup_db.psql diff --git a/js/src/components/Account/Login.vue b/js/src/components/Account/Login.vue index dcc74a40d..35897bc41 100644 --- a/js/src/components/Account/Login.vue +++ b/js/src/components/Account/Login.vue @@ -110,8 +110,9 @@ this.credentials.password = this.password; } - loginAction(e) { + loginAction(e: Event) { e.preventDefault(); + this.$apollo.mutate({ mutation: LOGIN, variables: { @@ -119,6 +120,7 @@ password: this.credentials.password, }, }).then((result) => { + console.log(result) this.saveUserData(result.data); this.$router.push({ name: 'Home' }); }).catch((e) => { diff --git a/js/src/vue-apollo.ts b/js/src/vue-apollo.ts index 0a613e000..beb57297a 100644 --- a/js/src/vue-apollo.ts +++ b/js/src/vue-apollo.ts @@ -42,7 +42,7 @@ const authMiddleware = new ApolloLink((operation, forward) => { }, }); - if (forward) forward(operation); + if (forward) return forward(operation); return null; });