mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 12:06:56 +08:00
fix: resolve TODO and FIXME in utils module (#220)
This commit is contained in:
@ -618,10 +618,9 @@ pub(crate) async fn authenticate_eph_key<'a>(
|
||||
.get_ephemeral_key(api_key)
|
||||
.await
|
||||
.change_context(errors::ApiErrorResponse::Unauthorized)?;
|
||||
utils::when(
|
||||
ek.customer_id.ne(&customer_id),
|
||||
Err(report!(errors::ApiErrorResponse::InvalidEphermeralKey)),
|
||||
)?;
|
||||
utils::when(ek.customer_id.ne(&customer_id), || {
|
||||
Err(report!(errors::ApiErrorResponse::InvalidEphermeralKey))
|
||||
})?;
|
||||
Ok(MerchantAuthentication::MerchantId(Cow::Owned(
|
||||
ek.merchant_id,
|
||||
)))
|
||||
|
||||
Reference in New Issue
Block a user