bug fixed
This commit is contained in:
parent
d7ddfe5c46
commit
dc10f5b8c4
|
@ -134,7 +134,16 @@ impl Composition {
|
||||||
let mut query_pagination = String::new();
|
let mut query_pagination = String::new();
|
||||||
|
|
||||||
if let Some(pagination) = &find_all.pagination {
|
if let Some(pagination) = &find_all.pagination {
|
||||||
let page = pagination.page.unwrap_or(1);
|
let page = match pagination.page {
|
||||||
|
Some(v) => {
|
||||||
|
if v < 1 {
|
||||||
|
1
|
||||||
|
} else {
|
||||||
|
v
|
||||||
|
}
|
||||||
|
}
|
||||||
|
None => 1,
|
||||||
|
};
|
||||||
if let Some(page_size) = pagination.page_size {
|
if let Some(page_size) = pagination.page_size {
|
||||||
write!(
|
write!(
|
||||||
&mut query_pagination,
|
&mut query_pagination,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user