mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 01:57:45 +08:00 
			
		
		
		
	refactor(router): Introduce ApiKeyId id type (#6324)
This commit is contained in:
		| @ -9,7 +9,7 @@ use crate::schema::api_keys; | ||||
| )] | ||||
| #[diesel(table_name = api_keys, primary_key(key_id), check_for_backend(diesel::pg::Pg))] | ||||
| pub struct ApiKey { | ||||
|     pub key_id: String, | ||||
|     pub key_id: common_utils::id_type::ApiKeyId, | ||||
|     pub merchant_id: common_utils::id_type::MerchantId, | ||||
|     pub name: String, | ||||
|     pub description: Option<String>, | ||||
| @ -23,7 +23,7 @@ pub struct ApiKey { | ||||
| #[derive(Debug, Insertable)] | ||||
| #[diesel(table_name = api_keys)] | ||||
| pub struct ApiKeyNew { | ||||
|     pub key_id: String, | ||||
|     pub key_id: common_utils::id_type::ApiKeyId, | ||||
|     pub merchant_id: common_utils::id_type::MerchantId, | ||||
|     pub name: String, | ||||
|     pub description: Option<String>, | ||||
| @ -141,7 +141,7 @@ mod diesel_impl { | ||||
| // Tracking data by process_tracker | ||||
| #[derive(Default, Debug, Deserialize, Serialize, Clone)] | ||||
| pub struct ApiKeyExpiryTrackingData { | ||||
|     pub key_id: String, | ||||
|     pub key_id: common_utils::id_type::ApiKeyId, | ||||
|     pub merchant_id: common_utils::id_type::MerchantId, | ||||
|     pub api_key_name: String, | ||||
|     pub prefix: String, | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Anurag Thakur
					Anurag Thakur