diff --git a/src/web/api/v1/contexts/torrent/handlers.rs b/src/web/api/v1/contexts/torrent/handlers.rs index 4e50f2b8..6c6f66f8 100644 --- a/src/web/api/v1/contexts/torrent/handlers.rs +++ b/src/web/api/v1/contexts/torrent/handlers.rs @@ -216,7 +216,7 @@ async fn redirect_to_details_url_using_canonical_info_hash_if_needed( #[allow(clippy::unused_async)] pub async fn update_torrent_info_handler( State(app_data): State>, - Extract(maybe_bearer_token): Extract, + ExtractLoggedInUser(user_id): ExtractLoggedInUser, Path(info_hash): Path, extract::Json(update_torrent_info_form): extract::Json, ) -> Response { @@ -224,11 +224,6 @@ pub async fn update_torrent_info_handler( return errors::Request::InvalidInfoHashParam.into_response(); }; - let user_id = match app_data.auth.get_user_id_from_bearer_token(&maybe_bearer_token).await { - Ok(user_id) => user_id, - Err(error) => return error.into_response(), - }; - match app_data .torrent_service .update_torrent_info(