From e181d91a019e2fb3cfebcaaebea9f558b35ff021 Mon Sep 17 00:00:00 2001 From: agnisa-cap Date: Thu, 24 Aug 2023 12:07:18 +0200 Subject: [PATCH] N21-844 changes migration redirect (#3278) --- helpers/authentication.js | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/helpers/authentication.js b/helpers/authentication.js index 433aa3b30f..eeba6ac981 100644 --- a/helpers/authentication.js +++ b/helpers/authentication.js @@ -408,22 +408,6 @@ const getMigrationStatus = async (req, res, userId, accessToken) => { return migration; }; -const getMigrationRedirect = (res, migration) => { - const { - targetSystemId, - mandatorySince, - } = migration; - - const queryString = new URLSearchParams({ - targetSystem: targetSystemId, - mandatory: !!mandatorySince, - }); - - const redirect = redirectHelper.joinPathWithQuery('/migration', queryString.toString()); - - return redirect; -}; - // eslint-disable-next-line consistent-return const loginUser = async (req, res, strategy, payload, postLoginRedirect, systemName) => { let accessToken; @@ -451,9 +435,7 @@ const loginUser = async (req, res, strategy, payload, postLoginRedirect, systemN setCookie(res, 'jwt', accessToken); if (migration) { - const migrationRedirect = getMigrationRedirect(res, migration); - - res.redirect(migrationRedirect); + res.redirect('/migration'); } else { const queryString = new URLSearchParams();