mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 10:06:32 +08:00 
			
		
		
		
	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:
		| @ -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 {} | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Prajjwal Kumar
					Prajjwal Kumar