From 2082442fdca83fadc14981145b76da5a09628eca Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 5 Jul 2021 20:01:31 -0400 Subject: [PATCH] Fix unwrap --- crates/routes/src/feeds.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/routes/src/feeds.rs b/crates/routes/src/feeds.rs index d2a062606..75542e740 100644 --- a/crates/routes/src/feeds.rs +++ b/crates/routes/src/feeds.rs @@ -130,8 +130,8 @@ async fn get_feed( ) -> Result { let sort_type = get_sort_type(info).map_err(ErrorBadRequest)?; - let req_type: String = req.match_info().get("type").unwrap().parse().unwrap(); - let param: String = req.match_info().get("name").unwrap().parse().unwrap(); + let req_type: String = req.match_info().get("type").unwrap_or("none").parse()?; + let param: String = req.match_info().get("name").unwrap_or("none").parse()?; let request_type = match req_type.as_str() { "u" => RequestType::User,