mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
Fix unwrap
This commit is contained in:
parent
97a944100b
commit
2082442fdc
@ -130,8 +130,8 @@ async fn get_feed(
|
||||
) -> Result<HttpResponse, Error> {
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user