Add current timestamp to callLogs api for reference when human is reading JSON
This commit is contained in:
parent
dbbe464533
commit
f850288796
2
index.js
2
index.js
|
|
@ -500,7 +500,7 @@ app.get("/api/v1/admin/callLogs", (req, res) => {
|
||||||
}
|
}
|
||||||
return newRow;
|
return newRow;
|
||||||
});
|
});
|
||||||
res.json({ totalPages, page, data: rows });
|
res.json({ totalPages, page, current_time: new Date().toISOString(), data: rows });
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.error('Error getting call logs:', err);
|
console.error('Error getting call logs:', err);
|
||||||
res.status(500).json({ error: 'Internal server error' });
|
res.status(500).json({ error: 'Internal server error' });
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue