mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
refactor(opensearch): Add Error Handling for Empty Query and Filters in Request (#5432)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -10,6 +10,15 @@ pub struct SearchFilters {
|
||||
pub customer_email: Option<Vec<HashedString<common_utils::pii::EmailStrategy>>>,
|
||||
pub search_tags: Option<Vec<HashedString<WithType>>>,
|
||||
}
|
||||
impl SearchFilters {
|
||||
pub fn is_all_none(&self) -> bool {
|
||||
self.payment_method.is_none()
|
||||
&& self.currency.is_none()
|
||||
&& self.status.is_none()
|
||||
&& self.customer_email.is_none()
|
||||
&& self.search_tags.is_none()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
|
||||
Reference in New Issue
Block a user