import Route from 'route';
import db from 'db';
const post = async (request, response) => {
const data = await db.create({
partnerCode: 'PARTNR',
productCode: 'PRODCT',
userDetails: {
firstName: 'John',
lastName: 'Doe',
mobileNumber: '9876543210',
email: 'john@gmail.com'
},
planSpecifics: {
loanDetails: {
loanAccountNumber: '5110112',
loanAmount: '50000',
interestRate: '8.5',
loanTenure: '24',
policyTerm: '24',
premiumFunding: 'Yes',
loanSanctionDate: '10-03-2022',
loanDisbursementDate: '22-03-2022'
},
sumAssured: '50500',
benefitOptions: []
}
});
return request.send(data, 'Success!', 'Failed!');
};
Route.post('/v1/generate-quote', post);