From 341bcf5b17bb0aa36633f6b557eafb7bc5f6ef29 Mon Sep 17 00:00:00 2001 From: Kasper Seweryn Date: Tue, 8 Mar 2022 14:04:54 +0000 Subject: [PATCH] Remove `require` from auth store --- front/src/store/auth.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/front/src/store/auth.js b/front/src/store/auth.js index 31a42e942..5f2a7fb36 100644 --- a/front/src/store/auth.js +++ b/front/src/store/auth.js @@ -132,7 +132,6 @@ export default { actions: { // Send a request to the login URL and save the returned JWT login ({ commit, dispatch }, { next, credentials, onError }) { - const router = require('@/router').default const form = new FormData() Object.keys(credentials).forEach((k) => { form.set(k, credentials[k]) @@ -142,7 +141,7 @@ export default { // commit('token', response.data.token) dispatch('fetchProfile').then(() => { // Redirect to a specified route - router.push(next) + return this.$router.push(next) }) }, response => { logger.default.error('Error while logging in', response.data)