tango-app-api-analysis-zone 3.0.0-alpha.23 → 3.0.0-alpha.24
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
|
@@ -261,7 +261,15 @@ export const customerJourneyV2 = async ( req, res ) => {
|
|
|
261
261
|
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
262
262
|
if ( resultData ) {
|
|
263
263
|
if ( resultData.status_code == '200' ) {
|
|
264
|
-
|
|
264
|
+
let customerJourneyData = resultData.customerJourneyData.zoneList; // ///
|
|
265
|
+
let newResultData = {};
|
|
266
|
+
newResultData.status_code = '200';
|
|
267
|
+
let newData = [];
|
|
268
|
+
for ( let i = 0; i < customerJourneyData.length; i++ ) {
|
|
269
|
+
newData.push( { 'from': customerJourneyData[i].from+' ('+customerJourneyData[i].fromCount+')', 'to': customerJourneyData[i].to+' ('+customerJourneyData[i].toCount+')', 'value': customerJourneyData[i].value } );
|
|
270
|
+
}
|
|
271
|
+
newResultData.customerJourneyData = newData;
|
|
272
|
+
return res.sendSuccess( newResultData );
|
|
265
273
|
} else {
|
|
266
274
|
return res.sendError( 'No Content', 204 );
|
|
267
275
|
}
|
|
@@ -192,6 +192,7 @@ export const validateCustomerJourneyV2Schema = joi.object( {
|
|
|
192
192
|
limit: joi.number().required(),
|
|
193
193
|
offset: joi.number().required(),
|
|
194
194
|
export: joi.boolean().required(),
|
|
195
|
+
sortType: joi.string().required(),
|
|
195
196
|
} );
|
|
196
197
|
|
|
197
198
|
export const validateCustomerJourneyV2Params = {
|