fin:GWM
This commit is contained in:
parent
84066becf7
commit
ccd04b0d35
@ -70,10 +70,13 @@ exports.MenuList = async (req, res) => {
|
||||
redirectionApi.then(function(redirectionApiData){
|
||||
if(redirectionApiData == false)
|
||||
{
|
||||
|
||||
resolve();
|
||||
logMsg.info("Redirection api data fetching failed for losid = "+losid);
|
||||
}
|
||||
else
|
||||
{
|
||||
logMsg.info("Redirection api data fetched successfully for losid = "+losid);
|
||||
// insert pro42data into entities table using using foreach
|
||||
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})
|
||||
.then(Entitydata => {
|
||||
|
||||
logMsg.info("entity created , data:"+Entitydata);
|
||||
const cin = Entitydata.dataValues.cin;
|
||||
if(cin != "")
|
||||
{
|
||||
@ -163,6 +166,7 @@ exports.MenuList = async (req, res) => {
|
||||
} else {
|
||||
// resolve here
|
||||
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 redirectionApiData else condition
|
||||
}) // end of Redirection api call
|
||||
} else { resolve(); }
|
||||
} else {
|
||||
resolve();
|
||||
logMsg.info("redirection api call not allowed because redirection_api_call = 0 ");
|
||||
}
|
||||
}); // end of promise
|
||||
|
||||
|
||||
@ -975,22 +982,6 @@ exports.test = async (req, res) => {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// exports.probedatatest = (req, res) => {
|
||||
// Sync(function()
|
||||
// {
|
||||
@ -1033,7 +1024,7 @@ exports.test = async (req, res) => {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ module.exports = app => {
|
||||
const { logMsg } = require('../services/logger.js');
|
||||
var router = require("express").Router();
|
||||
|
||||
router.get("/test", financials.test);
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/checkProbeStatus:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user