tango-app-api-analysis-traffic 3.0.0-alpha.19 → 3.0.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -119,6 +119,14 @@ export const densityDwellV1 = async ( req, res ) => {
|
|
|
119
119
|
export const overallCardsV1 = async ( req, res ) => {
|
|
120
120
|
try {
|
|
121
121
|
let reqestData = req.body;
|
|
122
|
+
if ( reqestData.processType && reqestData.processType == 'missedOpportunity' ) {
|
|
123
|
+
let getClientData = await clientService.findOne( { clientId: reqestData.clientId } );
|
|
124
|
+
if ( !getClientData ) {
|
|
125
|
+
return res.sendError( 'Invalid Client Id', 400 );
|
|
126
|
+
}
|
|
127
|
+
reqestData.currency = getClientData.paymentInvoice?.currencyType || 'INR';
|
|
128
|
+
reqestData.revenue = getClientData.averageTransactionValue || '0';
|
|
129
|
+
}
|
|
122
130
|
let LamdaURL = 'https://dugu3ghkgalnpaydf2wdjp37240pzcmy.lambda-url.ap-south-1.on.aws/';
|
|
123
131
|
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
124
132
|
if ( resultData ) {
|
|
@@ -125,6 +125,14 @@ export const densityDwellV1 = async ( req, res ) => {
|
|
|
125
125
|
export const overallCardsV1 = async ( req, res ) => {
|
|
126
126
|
try {
|
|
127
127
|
let reqestData = req.body;
|
|
128
|
+
if ( reqestData.processType && reqestData.processType == 'missedOpportunity' ) {
|
|
129
|
+
let getClientData = await clientService.findOne( { clientId: reqestData.clientId } );
|
|
130
|
+
if ( !getClientData ) {
|
|
131
|
+
return res.sendError( 'Invalid Client Id', 400 );
|
|
132
|
+
}
|
|
133
|
+
reqestData.currency = getClientData.paymentInvoice?.currencyType || 'INR';
|
|
134
|
+
reqestData.revenue = getClientData.averageTransactionValue || '0';
|
|
135
|
+
}
|
|
128
136
|
let LamdaURL = 'https://dugu3ghkgalnpaydf2wdjp37240pzcmy.lambda-url.ap-south-1.on.aws/';
|
|
129
137
|
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
130
138
|
if ( resultData ) {
|