refactor(masking): PII improvements (#77)

This commit is contained in:
kos-for-juspay
2022-12-13 08:50:21 +01:00
committed by GitHub
parent b3fefeb2aa
commit 124048ce75
16 changed files with 188 additions and 162 deletions

View File

@ -6,7 +6,7 @@ use std::{borrow::Cow, collections::HashMap, fmt::Debug, future::Future, str, ti
use actix_web::{body, HttpRequest, HttpResponse, Responder};
use bytes::Bytes;
use error_stack::{report, IntoReport, Report, ResultExt};
use masking::PeekOptionInterface;
use masking::ExposeOptionInterface;
use router_env::{
tracing::{self, instrument},
Tag,
@ -223,7 +223,7 @@ async fn send_request(
client.body(url_encoded_payload).send()
}
None => client
.body(request.payload.peek_cloning().unwrap_or_default())
.body(request.payload.expose_option().unwrap_or_default())
.send(),
}
.await