set status to sent if sent

This commit is contained in:
2026-03-25 16:34:23 -05:00
parent acd5b7d605
commit 453f8654b7

View File

@@ -895,7 +895,7 @@ router.post('/:id/send-email', async (req, res) => {
const info = await sendInvoiceEmail(invoice, recipientEmail, customText, stripeLink, pdfBuffer);
// 4. (Optional) Status in der DB aktualisieren
//await pool.query('UPDATE invoices SET email_status = $1 WHERE id = $2', ['sent', id]);
await pool.query('UPDATE invoices SET email_status = $1 WHERE id = $2', ['sent', id]);
res.json({ success: true, messageId: info.messageId });