Skip to content

Commit

Permalink
✨ api: move lang parameter before token
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiaPena committed Dec 5, 2024
1 parent fd188a1 commit 662a02b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
};
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
});
});

0 comments on commit 662a02b

Please sign in to comment.