feat(admin): add payment_connector_list API (#160)

This commit is contained in:
Nishant Joshi
2022-12-15 19:43:44 +05:30
committed by GitHub
parent bc2f13ab07
commit e5ea411fb0
6 changed files with 104 additions and 18 deletions

View File

@ -130,6 +130,24 @@ pub async fn payment_connector_retrieve(
.await
}
#[instrument(skip_all, fields(flow = ?Flow::PaymentConnectorsList))]
pub async fn payment_connector_list(
state: web::Data<AppState>,
req: HttpRequest,
path: web::Path<String>,
) -> HttpResponse {
let merchant_id = path.into_inner();
api::server_wrap(
&state,
&req,
merchant_id,
|state, _, merchant_id| list_payment_connectors(&*state.store, merchant_id),
api::MerchantAuthentication::AdminApiKey,
)
.await
}
#[instrument(skip_all, fields(flow = ?Flow::PaymentConnectorsUpdate))]
// #[post("/{merchant_id}/connectors/{merchant_connector_id}")]
pub async fn payment_connector_update(