Skip to content

Commit

Permalink
🚧 mon-pix: remove lang parameter from token
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiaPena committed Dec 4, 2024
1 parent fd188a1 commit dfbaed4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mon-pix/app/components/download-session-results.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default class DownloadSessionResults extends Component {
this.showErrorMessage = false;

try {
const token = decodeURIComponent(PixWindow.getLocationHash().slice(1));
const token = decodeURIComponent(PixWindow.getLocationHash().slice(1, -8));
await this.fileSaver.save({
url: `${ENV.APP.API_HOST}/api/sessions/download-all-results`,
options: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ module('Integration | Component | download-session-results', function (hooks) {
// given
fileSaver.save.resolves();
const tokenHash = 'mytoken';
sinon.stub(PixWindow, 'getLocationHash').returns(`#${tokenHash}`);
sinon.stub(PixWindow, 'getLocationHash').returns(`#${tokenHash}?lang=fr`);

// when
const screen = await render(hbs`<DownloadSessionResults />`);
Expand Down

0 comments on commit dfbaed4

Please sign in to comment.