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

Remove always-empty peer list in torrent list item #570

Conversation

josecelano
Copy link
Member

The endpoint to get the list of torrents returns a list of items like this:

[
  {
    "info_hash": "0031ad8520ddfebd856d70776063e477eaf07ada",
    "seeders": 0,
    "completed": 0,
    "leechers": 1,
    "peers": null
    }
]

The peers list is always null even if there are peers. That's very confusing especially if you enable the config option remove_peerless_torrents.

This PR removes that unused attribute.

@josecelano josecelano force-pushed the 536-remove-empty-peer-list-in-api-get-torrents-endpoint branch from c150db7 to d03e930 Compare January 2, 2024 15:57
Copy link

codecov bot commented Jan 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9826400) 79.30% compared to head (d03e930) 79.29%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #570      +/-   ##
===========================================
- Coverage    79.30%   79.29%   -0.01%     
===========================================
  Files          117      117              
  Lines         7736     7733       -3     
===========================================
- Hits          6135     6132       -3     
  Misses        1601     1601              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@josecelano
Copy link
Member Author

ACK d03e930

@josecelano josecelano merged commit 69fe572 into torrust:develop Jan 2, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Remove empty peer list in API GET /torrents endpoint
1 participant