mirror of
https://github.com/LemmyNet/lemmy
synced 2024-11-13 00:07:08 +00:00
Fix unwrap
This commit is contained in:
parent
97a944100b
commit
2082442fdc
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue