From 662a02bcb74992e9e1ebdc1ddcbdf3883f005569 Mon Sep 17 00:00:00 2001 From: AndreiaPena Date: Thu, 5 Dec 2024 10:13:45 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20api:=20move=20lang=20parameter=20be?= =?UTF-8?q?fore=20token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../results/domain/services/session-results-link-service.js | 2 +- .../unit/domain/services/session-results-link-service_test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/certification/results/domain/services/session-results-link-service.js b/api/src/certification/results/domain/services/session-results-link-service.js index 924542432c1..7dadb0bac91 100644 --- a/api/src/certification/results/domain/services/session-results-link-service.js +++ b/api/src/certification/results/domain/services/session-results-link-service.js @@ -4,5 +4,5 @@ import { tokenService } from '../../../../shared/domain/services/token-service.j export const generateResultsLink = function ({ sessionId, i18n }) { const token = tokenService.createCertificationResultsLinkToken({ sessionId }); const lang = i18n.getLocale(); - return `${config.domain.pixApp + config.domain.tldOrg}/resultats-session#${token}?lang=${lang}`; + return `${config.domain.pixApp + config.domain.tldOrg}/resultats-session?lang=${lang}#${token}`; }; diff --git a/api/tests/certification/results/unit/domain/services/session-results-link-service_test.js b/api/tests/certification/results/unit/domain/services/session-results-link-service_test.js index b3f1af1916a..86ca60263ab 100644 --- a/api/tests/certification/results/unit/domain/services/session-results-link-service_test.js +++ b/api/tests/certification/results/unit/domain/services/session-results-link-service_test.js @@ -16,7 +16,7 @@ describe('Certification | Results | Unit | Domain | Service | Session Results Li const link = sessionResultsLinkService.generateResultsLink({ sessionId, i18n }); // then - expect(link).to.deep.equal('https://test.app.pix.org/resultats-session#a_valid_token?lang=fr'); + expect(link).to.deep.equal('https://test.app.pix.org/resultats-session?lang=fr#a_valid_token'); }); }); });