tango-app-api-analysis-zone 3.7.1-alpha.4 → 3.7.1-alpha.6
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
|
@@ -812,6 +812,22 @@ export const ZonewiseCustomerFunnelExport = async ( req, res ) => {
|
|
|
812
812
|
|
|
813
813
|
|
|
814
814
|
// new Pantprojects api for Zone FF V2
|
|
815
|
+
export const getZoneAPIFFV2 = async ( req, res ) => {
|
|
816
|
+
try {
|
|
817
|
+
let reqestData = req.body;
|
|
818
|
+
let LamdaURL = 'https://kxz75vd4lsgpf4ykytgmyllmoa0xwixt.lambda-url.ap-south-1.on.aws/';
|
|
819
|
+
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
820
|
+
if ( resultData ) {
|
|
821
|
+
return res.sendSuccess( resultData );
|
|
822
|
+
} else {
|
|
823
|
+
return res.sendError( 'No Content', 204 );
|
|
824
|
+
}
|
|
825
|
+
} catch ( error ) {
|
|
826
|
+
logger.error( { error: error, message: req.query, function: 'getZoneAPIFFV2' } );
|
|
827
|
+
return res.sendError( { error: error }, 500 );
|
|
828
|
+
}
|
|
829
|
+
};
|
|
830
|
+
|
|
815
831
|
export const getNewZoneFFV2 = async ( req, res ) => {
|
|
816
832
|
try {
|
|
817
833
|
let reqestData = req.body;
|
|
@@ -819,7 +835,6 @@ export const getNewZoneFFV2 = async ( req, res ) => {
|
|
|
819
835
|
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
820
836
|
if ( resultData ) {
|
|
821
837
|
if ( resultData.status_code == '200' ) {
|
|
822
|
-
// console.log( 'resultData =>', resultData );
|
|
823
838
|
return res.sendSuccess( resultData );
|
|
824
839
|
} else {
|
|
825
840
|
return res.sendError( 'No Content', 204 );
|
|
@@ -832,7 +847,6 @@ export const getNewZoneFFV2 = async ( req, res ) => {
|
|
|
832
847
|
return res.sendError( { error: error }, 500 );
|
|
833
848
|
}
|
|
834
849
|
};
|
|
835
|
-
|
|
836
850
|
export const getSelectedZoneFFV2 = async ( req, res ) => {
|
|
837
851
|
try {
|
|
838
852
|
let reqestData = req.body;
|
|
@@ -841,7 +855,6 @@ export const getSelectedZoneFFV2 = async ( req, res ) => {
|
|
|
841
855
|
if ( resultData ) {
|
|
842
856
|
if ( resultData.status_code == '200' ) {
|
|
843
857
|
if ( reqestData.export ) {
|
|
844
|
-
console.log( resultData, 'resultData' );
|
|
845
858
|
const exportdata = [];
|
|
846
859
|
const element = resultData.data;
|
|
847
860
|
const row = {
|
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
ZonewiseCustomerFunnelExport,
|
|
42
42
|
getNewZoneFFV2,
|
|
43
43
|
getSelectedZoneFFV2,
|
|
44
|
+
getZoneAPIFFV2,
|
|
44
45
|
} from '../controllers/analysisZoneV1.controllers.js';
|
|
45
46
|
|
|
46
47
|
analysisZoneRouter
|
|
@@ -165,5 +166,6 @@ analysisZoneRouter
|
|
|
165
166
|
|
|
166
167
|
|
|
167
168
|
.post( '/getNewZoneFF_v2', getNewZoneFFV2 )
|
|
168
|
-
.post( '/getSelectedZoneFF_v2', getSelectedZoneFFV2 )
|
|
169
|
+
.post( '/getSelectedZoneFF_v2', getSelectedZoneFFV2 )
|
|
170
|
+
.post( '/getZoneAPI_v2', getZoneAPIFFV2 );
|
|
169
171
|
export default analysisZoneRouter;
|