28 lines
668 B
JavaScript
28 lines
668 B
JavaScript
|
|
import db from './src/database/models/index.js';
|
|
|
|
async function check() {
|
|
try {
|
|
const applicationId = 'APP-2026-2709';
|
|
const application = await db.Application.findOne({ where: { applicationId } });
|
|
|
|
if (!application) {
|
|
console.log('Application not found');
|
|
process.exit(0);
|
|
}
|
|
|
|
const request = await db.LoaRequest.findOne({ where: { applicationId: application.id } });
|
|
if (request) {
|
|
console.log(`Request ID: ${request.id}, Status: ${request.status}`);
|
|
} else {
|
|
console.log('No LoaRequest found');
|
|
}
|
|
|
|
process.exit(0);
|
|
} catch (e) {
|
|
console.error(e);
|
|
process.exit(1);
|
|
}
|
|
}
|
|
check();
|