refactor(business_profile): change id for business profile (#5748)

This commit is contained in:
Narayan Bhat
2024-09-02 15:25:22 +05:30
committed by GitHub
parent c03587f9c6
commit 8e5c33e2d8
27 changed files with 538 additions and 274 deletions

View File

@ -1097,7 +1097,7 @@ pub async fn validate_and_get_business_profile(
// Check if the merchant_id of business profile is same as the current merchant_id
if business_profile.merchant_id.ne(merchant_id) {
Err(errors::ApiErrorResponse::AccessForbidden {
resource: business_profile.profile_id.get_string_repr().to_owned(),
resource: business_profile.get_id().get_string_repr().to_owned(),
}
.into())
} else {
@ -1193,7 +1193,7 @@ pub async fn get_profile_id_from_business_details(
id: profile_name,
})?;
Ok(business_profile.profile_id)
Ok(business_profile.get_id().to_owned())
}
_ => Err(report!(errors::ApiErrorResponse::MissingRequiredField {
field_name: "profile_id or business_country, business_label"