feat: Display received time and fix timestamp timezone conversion.
This commit is contained in:
parent
9ab3621658
commit
742aa4d2fc
|
|
@ -29,7 +29,7 @@ app.get('/api/messages', async (req, res) => {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const [rows] = await db.execute(
|
const [rows] = await db.execute(
|
||||||
'SELECT id, sender, recipient, subject, body, received_at FROM emails WHERE recipient LIKE ? ORDER BY received_at DESC',
|
'SELECT id, sender, recipient, subject, body, CAST(received_at AS CHAR) as received_at FROM emails WHERE recipient LIKE ? ORDER BY received_at DESC',
|
||||||
[`%${recipient}%`]
|
[`%${recipient}%`]
|
||||||
);
|
);
|
||||||
res.json(rows);
|
res.json(rows);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue