fix: ifsc details 404 on wrong IFSC
This commit is contained in:
@@ -121,7 +121,7 @@ async function getIfscDetails(req, res) {
|
||||
try {
|
||||
const query = 'SELECT * FROM ifsc_details WHERE ifsc_code = $1';
|
||||
const result = await db.query(query, [ifscCode]);
|
||||
if (!result.rows) {
|
||||
if (result.rows?.length === 0) {
|
||||
res.status(404).json({ error: 'NOT_FOUND' });
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user