From 25b103d36a6b73e4c54e1e8dcbc8a89bc51ad6cc Mon Sep 17 00:00:00 2001 From: PARK BYUNG JUN Date: Thu, 1 Sep 2022 17:56:27 +0000 Subject: [PATCH] bug fixed --- src/compositions/member/composition.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/compositions/member/composition.rs b/src/compositions/member/composition.rs index 48e29b8..0c7afd9 100644 --- a/src/compositions/member/composition.rs +++ b/src/compositions/member/composition.rs @@ -355,7 +355,16 @@ impl Composition { let mut query_pagination = String::new(); 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 { write!( &mut query_pagination,