feat(core): routes to toggle blocklist (#3568)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Shanks <shashank.attarde@juspay.in>
This commit is contained in:
Prajjwal Kumar
2024-02-07 17:22:48 +05:30
committed by GitHub
parent a15e7ae9b1
commit fbe84b2a33
10 changed files with 186 additions and 0 deletions

View File

@ -22,6 +22,11 @@ pub struct BlocklistResponse {
pub created_at: time::PrimitiveDateTime,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)]
pub struct ToggleBlocklistResponse {
pub blocklist_guard_status: String,
}
pub type AddToBlocklistResponse = BlocklistResponse;
pub type DeleteFromBlocklistResponse = BlocklistResponse;
@ -39,6 +44,14 @@ fn default_list_limit() -> u16 {
10
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)]
pub struct ToggleBlocklistQuery {
#[schema(value_type = BlocklistDataKind)]
pub status: bool,
}
impl ApiEventMetric for BlocklistRequest {}
impl ApiEventMetric for BlocklistResponse {}
impl ApiEventMetric for ToggleBlocklistResponse {}
impl ApiEventMetric for ListBlocklistQuery {}
impl ApiEventMetric for ToggleBlocklistQuery {}