mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
revert: connector_label in webhook url is reverted back to connector_name (#1779)
This commit is contained in:
@ -630,18 +630,9 @@ pub async fn webhooks_core<W: types::OutgoingWebhookType>(
|
||||
req: &actix_web::HttpRequest,
|
||||
merchant_account: domain::MerchantAccount,
|
||||
key_store: domain::MerchantKeyStore,
|
||||
connector_label: &str,
|
||||
connector_name: &str,
|
||||
body: actix_web::web::Bytes,
|
||||
) -> RouterResponse<serde_json::Value> {
|
||||
let connector_name = connector_label
|
||||
.split('_') //connector_name will be the first string after splitting connector_label
|
||||
.next()
|
||||
.ok_or(errors::ApiErrorResponse::InvalidDataValue {
|
||||
field_name: "connector_label",
|
||||
})
|
||||
.into_report()
|
||||
.attach_printable("Failed to infer connector_name from connector_label")?;
|
||||
|
||||
metrics::WEBHOOK_INCOMING_COUNT.add(
|
||||
&metrics::CONTEXT,
|
||||
1,
|
||||
@ -688,7 +679,7 @@ pub async fn webhooks_core<W: types::OutgoingWebhookType>(
|
||||
|
||||
let process_webhook_further = utils::lookup_webhook_event(
|
||||
&*state.store,
|
||||
connector_label,
|
||||
connector_name,
|
||||
&merchant_account.merchant_id,
|
||||
&event_type,
|
||||
)
|
||||
@ -704,7 +695,7 @@ pub async fn webhooks_core<W: types::OutgoingWebhookType>(
|
||||
&*state.store,
|
||||
&request_details,
|
||||
&merchant_account.merchant_id,
|
||||
connector_label,
|
||||
connector_name,
|
||||
&key_store,
|
||||
)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user