Skip to content

Commit

Permalink
feat: [#488] return an error in the torrent details endpoint when use…
Browse files Browse the repository at this point in the history
…r tracker keys can't be generated
  • Loading branch information
josecelano committed Feb 23, 2024
1 parent b41488b commit c1fd866
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/services/torrent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,14 +367,7 @@ impl Index {
// Add main tracker URL
match opt_user_id {
Some(user_id) => {
// If no user owned tracker key can be found, use default tracker url
// code-review: for downloading the torrent file it returns an error
// instead of defaulting to the default tracker URL.
let personal_announce_url = self
.tracker_service
.get_personal_announce_url(user_id)
.await
.unwrap_or(tracker_url);
let personal_announce_url = self.tracker_service.get_personal_announce_url(user_id).await?;

torrent_response.include_url_as_main_tracker(&personal_announce_url);
}
Expand Down

0 comments on commit c1fd866

Please sign in to comment.