feat: add updated_by to tracker tables (#2604)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Kartikeya Hegde
2023-10-17 11:26:56 +00:00
committed by GitHub
parent 274a78343e
commit 6a74e8cba9
46 changed files with 549 additions and 176 deletions

View File

@ -454,6 +454,7 @@ pub trait CustomerAddress {
&self,
address_details: api_models::payments::AddressDetails,
key: &[u8],
storage_scheme: storage::enums::MerchantStorageScheme,
) -> CustomResult<storage::AddressUpdate, common_utils::errors::CryptoError>;
async fn get_domain_address(
@ -462,6 +463,7 @@ pub trait CustomerAddress {
merchant_id: &str,
customer_id: &str,
key: &[u8],
storage_scheme: storage::enums::MerchantStorageScheme,
) -> CustomResult<domain::Address, common_utils::errors::CryptoError>;
}
@ -471,6 +473,7 @@ impl CustomerAddress for api_models::customers::CustomerRequest {
&self,
address_details: api_models::payments::AddressDetails,
key: &[u8],
storage_scheme: storage::enums::MerchantStorageScheme,
) -> CustomResult<storage::AddressUpdate, common_utils::errors::CryptoError> {
async {
Ok(storage::AddressUpdate::Update {
@ -510,6 +513,7 @@ impl CustomerAddress for api_models::customers::CustomerRequest {
.async_lift(|inner| encrypt_optional(inner, key))
.await?,
country_code: self.phone_country_code.clone(),
updated_by: storage_scheme.to_string(),
})
}
.await
@ -521,6 +525,7 @@ impl CustomerAddress for api_models::customers::CustomerRequest {
merchant_id: &str,
customer_id: &str,
key: &[u8],
storage_scheme: storage::enums::MerchantStorageScheme,
) -> CustomResult<domain::Address, common_utils::errors::CryptoError> {
async {
Ok(domain::Address {
@ -567,6 +572,7 @@ impl CustomerAddress for api_models::customers::CustomerRequest {
payment_id: None,
created_at: common_utils::date_time::now(),
modified_at: common_utils::date_time::now(),
updated_by: storage_scheme.to_string(),
})
}
.await