Redirect to hello, add redirect query param
This commit is contained in:
parent
e067717d50
commit
e9713c736b
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.';
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue