Merge branch 'feature/fix-graph-ql' into 'master'

Fix vue appolo graphql middleware

See merge request framasoft/mobilizon!36
This commit is contained in:
Thomas Citharel 2018-12-28 16:21:26 +01:00
commit a941621ea4
3 changed files with 5 additions and 2 deletions

1
.gitignore vendored
View File

@ -16,6 +16,7 @@ erl_crash.dump
/config/*.secret.exs
.env.production
.env
setup_db.psql

View File

@ -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) => {

View File

@ -42,7 +42,7 @@ const authMiddleware = new ApolloLink((operation, forward) => {
},
});
if (forward) forward(operation);
if (forward) return forward(operation);
return null;
});