tango-app-api-analysis-zone 3.7.1-alpha.19 → 3.7.1-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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-app-api-analysis-zone",
3
- "version": "3.7.1-alpha.19",
3
+ "version": "3.7.1-alpha.20",
4
4
  "description": "zone Analysis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -231,6 +231,7 @@ export const zoneHeatmapAvailableDatesV1 = async ( req, res ) => {
231
231
  let LamdaURL = 'https://tgtkai5zzq7fhp7ymtsnm3a2lm0czulr.lambda-url.ap-south-1.on.aws/';
232
232
  let resultData = await LamdaServiceCall( LamdaURL, reqestData );
233
233
  if ( resultData ) {
234
+ console.log( resultData, reqestData );
234
235
  if ( resultData.status_code == '200' ) {
235
236
  return res.sendSuccess( resultData );
236
237
  } else {
@@ -346,6 +346,26 @@ export const customerJourneyTableV2 = async ( req, res ) => {
346
346
  }
347
347
  };
348
348
 
349
+ export const sankychartV2 = async ( req, res ) => {
350
+ try {
351
+ let reqestData = req.body;
352
+ let LamdaURL = 'https://35np436xn3emlfrs56qrhmjymu0rbxem.lambda-url.ap-south-1.on.aws/';
353
+ let resultData = await LamdaServiceCall( LamdaURL, reqestData );
354
+ if ( resultData ) {
355
+ if ( resultData.status_code == '200' ) {
356
+ return res.sendSuccess( resultData );
357
+ } else {
358
+ return res.sendError( 'No Content', 204 );
359
+ }
360
+ } else {
361
+ return res.sendError( 'No Content', 204 );
362
+ }
363
+ } catch ( error ) {
364
+ logger.error( { error: error, message: req.query, function: 'sankychartV2' } );
365
+ return res.sendError( { error: error }, 500 );
366
+ }
367
+ };
368
+
349
369
  export async function isAllowedClient( req, res, next ) {
350
370
  try {
351
371
  let reqestData = req.body;
@@ -30,6 +30,7 @@ import {
30
30
  trajectoryAnalysisRateV2,
31
31
  customerJourneyV2,
32
32
  customerJourneyTableV2,
33
+ sankychartV2,
33
34
  } from '../controllers/analysisZoneV2.controllers.js';
34
35
 
35
36
  analysisZoneV2Router
@@ -103,5 +104,6 @@ analysisZoneV2Router
103
104
  userType: [ 'tango', 'client' ], access: [
104
105
  { featureName: 'TangoEye', name: 'ZoneTag', permissions: [] },
105
106
  ],
106
- } ), validate( validationDtos.validateCustomerJourneyTableV2Params ), customerJourneyTableV2 );
107
+ } ), validate( validationDtos.validateCustomerJourneyTableV2Params ), customerJourneyTableV2 )
108
+ .post( '/sankychart_v2', sankychartV2 );
107
109
  export default analysisZoneV2Router;