From 42ff6fe6000b682421809a8fd85951f35bee4007 Mon Sep 17 00:00:00 2001 From: Marcos Date: Thu, 10 Mar 2022 13:36:54 +0100 Subject: [PATCH] Fix login redirect (#1736) --- front/src/store/auth.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/front/src/store/auth.js b/front/src/store/auth.js index 5f2a7fb36..1de735e30 100644 --- a/front/src/store/auth.js +++ b/front/src/store/auth.js @@ -2,6 +2,7 @@ import Vue from 'vue' import axios from 'axios' import logger from '@/logging' import lodash from 'lodash' +import router from '@/router' function getDefaultScopedTokens () { return { @@ -141,7 +142,7 @@ export default { // commit('token', response.data.token) dispatch('fetchProfile').then(() => { // Redirect to a specified route - return this.$router.push(next) + return router.push(next) }) }, response => { logger.default.error('Error while logging in', response.data)