diff --git a/client/src/graphql/client.js b/client/src/graphql/client.js index 600bf51c..9ae5251c 100644 --- a/client/src/graphql/client.js +++ b/client/src/graphql/client.js @@ -42,7 +42,6 @@ export default function (uri, networkErrorCallback) { }); const errorLink = onError(({response, operation, networkError, graphQLErrors}) => { - if (networkError && networkErrorCallback) { networkErrorCallback(networkError.statusCode); return Observable.of(); diff --git a/client/src/main.js b/client/src/main.js index 9f3f4e80..18771c7c 100644 --- a/client/src/main.js +++ b/client/src/main.js @@ -155,12 +155,12 @@ function networkErrorCallback(statusCode) { router.beforeEach(async (to, from, next) => { if (to.path === '/logout') { privateApolloClient.resetStore(); - next({name: 'login'}); + next({name: 'hello'}); return; } if (unauthorizedAccess(to)) { - const redirectUrl = `/login?redirect=${to.path}`; + const redirectUrl = `/hello?redirect=${to.path}`; next(redirectUrl); return; } diff --git a/client/src/pages/email-verification.vue b/client/src/pages/email-verification.vue index f1da948a..1ecec566 100644 --- a/client/src/pages/email-verification.vue +++ b/client/src/pages/email-verification.vue @@ -56,14 +56,14 @@ export default { } else { this.$router.push('/'); } - } else { switch (data.registration.errors[0].field) { case 'invalid_key': this.errorMessage = 'Der angegebene Verifizierungscode ist falsch oder abgelaufen.'; break; case 'no_valid_license': - this.$router.push({name: 'licenseActivation'}) + this.$router.push({name: 'licenseActivation'}); + break; default: this.errorMessage = 'Ein Fehler ist aufgetreten. Bitte kontaktieren Sie den Administrator.'; } diff --git a/client/src/pages/hello.vue b/client/src/pages/hello.vue index cf35e870..d0ed463d 100644 --- a/client/src/pages/hello.vue +++ b/client/src/pages/hello.vue @@ -56,9 +56,8 @@ export default { variables: { helloEmail: this.email } - }) - - this.$router.push({name: redirectRouteName}); + }); + this.$router.push({name: redirectRouteName, query: this.$route.query}); }) .catch(() => { this.registrationError = 'Es ist ein Fehler aufgetreten. Bitte versuchen Sie es nochmals.'; diff --git a/client/src/pages/login.vue b/client/src/pages/login.vue index 8d8dc540..ff18487f 100644 --- a/client/src/pages/login.vue +++ b/client/src/pages/login.vue @@ -48,7 +48,6 @@ export default { validateBeforeSubmit() { this.$validator.validate().then(result => { this.submitted = true; - let that = this; if (result) { login(this.helloEmail.email, this.password) .then((response) => {