feat(opensearch): refactoring (#4244)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
This commit is contained in:
ivor-juspay
2024-05-02 15:50:58 +05:30
committed by GitHub
parent e4ed1e6395
commit 22cb01ac1e
16 changed files with 693 additions and 151 deletions

View File

@ -614,9 +614,9 @@ pub mod routes {
json_payload.into_inner(),
|state, auth: AuthenticationData, req, _| async move {
analytics::search::msearch_results(
&state.opensearch_client,
req,
&auth.merchant_account.merchant_id,
state.conf.opensearch.clone(),
)
.await
.map(ApplicationResponse::Json)
@ -645,9 +645,9 @@ pub mod routes {
indexed_req,
|state, auth: AuthenticationData, req, _| async move {
analytics::search::search_results(
&state.opensearch_client,
req,
&auth.merchant_account.merchant_id,
state.conf.opensearch.clone(),
)
.await
.map(ApplicationResponse::Json)