set status to sent if sent
This commit is contained in:
@@ -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 });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user