Merge pull request 'Fix error when no facets are specifed' (#16) from BlankParenthesis/hopper:fix-filter into main

Reviewed-on: #16
This commit is contained in:
Emma Tebibyte 2022-12-24 04:06:21 +00:00
commit 132d82680b
1 changed files with 4 additions and 1 deletions

View File

@ -54,7 +54,10 @@ impl HopperClient {
.to_string();
facets.push(package_type_facet);
}
params.push(("facets", format!("[{}]", facets.join(","))));
if !facets.is_empty() {
params.push(("facets", format!("[{}]", facets.join(","))));
}
let url = reqwest::Url::parse_with_params(url.as_str(), &params)?;
info!("GET {}", url);