From c1fd8666644cea151c55d80560078b2d00689710 Mon Sep 17 00:00:00 2001 From: Jose Celano Date: Fri, 23 Feb 2024 16:35:20 +0000 Subject: [PATCH] feat: [#488] return an error in the torrent details endpoint when user tracker keys can't be generated --- src/services/torrent.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/services/torrent.rs b/src/services/torrent.rs index 73a6e38e..20f4a2a3 100644 --- a/src/services/torrent.rs +++ b/src/services/torrent.rs @@ -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); }