Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix repetition of fields in download URLs #3627

Closed
wants to merge 1 commit into from

Conversation

theosanderson
Copy link
Member

@theosanderson theosanderson commented Feb 5, 2025

Fixes #3626

Update generateDownloadUrl method to prevent duplicate fields in download URL.

  • Prevent duplicate fields

    • Use params.set instead of params.append for versionStatus and isRevocation fields.
    • Add checks to ensure versionStatus and isRevocation fields are not already set before setting them.
  • General improvements

    • Replace params.append with params.set for all fields in downloadParameters.toUrlSearchParams().

For more details, open the Copilot Workspace session.

Fixes #3626

Update `generateDownloadUrl` method to prevent duplicate fields in download URL.

* **Prevent duplicate fields**
  - Use `params.set` instead of `params.append` for `versionStatus` and `isRevocation` fields.
  - Add checks to ensure `versionStatus` and `isRevocation` fields are not already set before setting them.

* **General improvements**
  - Replace `params.append` with `params.set` for all fields in `downloadParameters.toUrlSearchParams()`.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/loculus-project/loculus/issues/3626?shareId=XXXX-XXXX-XXXX-XXXX).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Repetition of fields in Download URLs and we were not respecting the choice to include all old versions
1 participant