diff --git a/chat/server.js b/chat/server.js
index 0b63fa7..f655da6 100644
--- a/chat/server.js
+++ b/chat/server.js
@@ -3559,6 +3559,7 @@ async function sendEmail({ to, subject, text, html }) {
}
const payload = {
+ from: SMTP_FROM || 'info@plugincompass.com',
to,
subject,
html: html || text || '',
@@ -3720,7 +3721,7 @@ function renderBrandedEmail({ title, preheader, bodyHtml, buttonText, buttonLink
@@ -18473,13 +18474,13 @@ async function routeInternal(req, res, url, pathname) {
if (req.method === 'GET' && pathname === '/api/topups/options') {
const session = requireUserAuth(req, res);
if (!session) return;
- return handleTopupOptions(req, res, session.userId);
+ return await handleTopupOptions(req, res, session.userId);
}
// Admin-only test endpoints for Dodo top-ups
if (req.method === 'GET' && pathname === '/api/admin/topups/options') {
const session = requireAdminAuth(req, res);
if (!session) return;
- return handleAdminTopupOptions(req, res);
+ return await handleAdminTopupOptions(req, res);
}
if (req.method === 'GET' && pathname === '/api/admin/topups/confirm') {
const session = requireAdminAuth(req, res);
@@ -18492,8 +18493,8 @@ async function routeInternal(req, res, url, pathname) {
return handleAdminTopupCheckout(req, res);
}
- if (req.method === 'GET' && pathname === '/api/topups/confirm') return handleTopupConfirm(req, res, url);
- if (req.method === 'POST' && pathname === '/api/topups/checkout') return handleTopupCheckout(req, res);
+ if (req.method === 'GET' && pathname === '/api/topups/confirm') return await handleTopupConfirm(req, res, url);
+ if (req.method === 'POST' && pathname === '/api/topups/checkout') return await handleTopupCheckout(req, res);
if (req.method === 'GET' && pathname === '/api/payg/status') return handlePaygStatus(req, res);
if (req.method === 'POST' && pathname === '/api/payg/checkout') return handlePaygCheckout(req, res);
if (req.method === 'GET' && pathname === '/api/payg/confirm') return handlePaygConfirm(req, res, url);