fin:GWM
This commit is contained in:
parent
84066becf7
commit
ccd04b0d35
@ -70,10 +70,13 @@ exports.MenuList = async (req, res) => {
|
|||||||
redirectionApi.then(function(redirectionApiData){
|
redirectionApi.then(function(redirectionApiData){
|
||||||
if(redirectionApiData == false)
|
if(redirectionApiData == false)
|
||||||
{
|
{
|
||||||
|
|
||||||
resolve();
|
resolve();
|
||||||
|
logMsg.info("Redirection api data fetching failed for losid = "+losid);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
logMsg.info("Redirection api data fetched successfully for losid = "+losid);
|
||||||
// insert pro42data into entities table using using foreach
|
// insert pro42data into entities table using using foreach
|
||||||
redirectionApiData.forEach((Pro42Datavalue, key,array)=>{
|
redirectionApiData.forEach((Pro42Datavalue, key,array)=>{
|
||||||
|
|
||||||
@ -90,7 +93,7 @@ exports.MenuList = async (req, res) => {
|
|||||||
|
|
||||||
Entities.create({ "losid":Pro42Datavalue.loginNo,"pan":Pro42Datavalue.pan,"cin":cin_number,"bizname":Pro42Datavalue.entityName,"entity_type":Pro42Datavalue.entityType,"probe42_data_status":1,"is_verified":0,"createdby":Pro42Datavalue.createdby})
|
Entities.create({ "losid":Pro42Datavalue.loginNo,"pan":Pro42Datavalue.pan,"cin":cin_number,"bizname":Pro42Datavalue.entityName,"entity_type":Pro42Datavalue.entityType,"probe42_data_status":1,"is_verified":0,"createdby":Pro42Datavalue.createdby})
|
||||||
.then(Entitydata => {
|
.then(Entitydata => {
|
||||||
|
logMsg.info("entity created , data:"+Entitydata);
|
||||||
const cin = Entitydata.dataValues.cin;
|
const cin = Entitydata.dataValues.cin;
|
||||||
if(cin != "")
|
if(cin != "")
|
||||||
{
|
{
|
||||||
@ -163,6 +166,7 @@ exports.MenuList = async (req, res) => {
|
|||||||
} else {
|
} else {
|
||||||
// resolve here
|
// resolve here
|
||||||
if (key === array.length -1) { resolve(); }
|
if (key === array.length -1) { resolve(); }
|
||||||
|
logMsg.info("CIN no not exist for losid = "+losid+" and entity name ="+Entitydata.dataValues.bizname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -179,7 +183,10 @@ exports.MenuList = async (req, res) => {
|
|||||||
}); // end of Redirection api data foreach
|
}); // end of Redirection api data foreach
|
||||||
} // end of redirectionApiData else condition
|
} // end of redirectionApiData else condition
|
||||||
}) // end of Redirection api call
|
}) // end of Redirection api call
|
||||||
} else { resolve(); }
|
} else {
|
||||||
|
resolve();
|
||||||
|
logMsg.info("redirection api call not allowed because redirection_api_call = 0 ");
|
||||||
|
}
|
||||||
}); // end of promise
|
}); // end of promise
|
||||||
|
|
||||||
|
|
||||||
@ -975,22 +982,6 @@ exports.test = async (req, res) => {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// exports.probedatatest = (req, res) => {
|
// exports.probedatatest = (req, res) => {
|
||||||
// Sync(function()
|
// Sync(function()
|
||||||
// {
|
// {
|
||||||
|
|||||||
@ -7,7 +7,7 @@ module.exports = app => {
|
|||||||
const { logMsg } = require('../services/logger.js');
|
const { logMsg } = require('../services/logger.js');
|
||||||
var router = require("express").Router();
|
var router = require("express").Router();
|
||||||
|
|
||||||
router.get("/test", financials.test);
|
|
||||||
/**
|
/**
|
||||||
* @swagger
|
* @swagger
|
||||||
* /api/checkProbeStatus:
|
* /api/checkProbeStatus:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user