mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
Forbid 0 in maxTotalHits
This commit is contained in:
parent
d40290aaaf
commit
1d6777ee68
4 changed files with 56 additions and 6 deletions
|
@ -454,7 +454,9 @@ pub struct PaginationAnalytics {
|
|||
|
||||
impl PaginationAnalytics {
|
||||
pub fn new(setting: Option<&PaginationSettings>) -> Self {
|
||||
Self { max_total_hits: setting.as_ref().and_then(|s| s.max_total_hits.set()) }
|
||||
Self {
|
||||
max_total_hits: setting.as_ref().and_then(|s| s.max_total_hits.set().map(|x| x.into())),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn into_settings(self) -> SettingsAnalytics {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue