This commit is contained in:
sriramv 2023-08-11 11:05:03 +05:30
parent 99bd0f7fca
commit eb6dd5dff7

View File

@ -19,7 +19,7 @@ exports.mainLandingPage = async (req, res) =>
include: [{ model: ApplicantsDetails , // Set the alias for the relationship
attributes: [
[sequelize.col('name'), 'loan_applicant_name'] // Alias for the 'name' column
] , where: { 'applicant_type' : 'Main Applicant'} }] }).then(data =>
] , limit: 1 }] }).then(data =>
{
if(data.length > 0)
{
@ -63,7 +63,7 @@ exports.mainLandingPage = async (req, res) =>
include: [{ model: ApplicantsDetails , // Set the alias for the relationship
attributes: [
[sequelize.col('name'), 'loan_applicant_name'] // Alias for the 'name' column
] , where: { 'applicant_type' : 'Main Applicant'} }] }).then(data => { if(data.length > 0) { res.send({'status':200,'message':"success",'data':data}); } else { res.send({'status':404,'message':"failed",'data':"No data"}); } })
] , limit: 1 }] }).then(data => { if(data.length > 0) { res.send({'status':200,'message':"success",'data':data}); } else { res.send({'status':404,'message':"failed",'data':"No data"}); } })
// Entity detail promise
var EntityKYCDetailDataInsert = new Promise(async(resolve, reject) =>
@ -182,7 +182,7 @@ exports.mainLandingPage = async (req, res) =>
include: [{ model: ApplicantsDetails , // Set the alias for the relationship
attributes: [
[sequelize.col('name'), 'loan_applicant_name'] // Alias for the 'name' column
] , where: { 'applicant_type' : 'Main Applicant'} }] }).then(data =>
] , limit: 1 }] }).then(data =>
{
if(data.length > 0)
{
@ -206,7 +206,7 @@ exports.mainLandingPage = async (req, res) =>
include: [{ model: ApplicantsDetails , // Set the alias for the relationship
attributes: [
[sequelize.col('name'), 'loan_applicant_name'] // Alias for the 'name' column
] , where: { 'applicant_type' : 'Main Applicant'} }] }).then(data =>
] , limit: 1 }] }).then(data =>
{
if(data.length > 0)
{