fix: standardize contact email to info@plugincompass.com and add await to topup handlers
This commit is contained in:
@@ -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
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footer">
|
||||
<p style="margin: 0 0 8px 0;">Need help? Contact us at <a href="mailto:support@plugincompass.com">support@plugincompass.com</a></p>
|
||||
<p style="margin: 0 0 8px 0;">Need help? Contact us at <a href="mailto:info@plugincompass.com">info@plugincompass.com</a></p>
|
||||
<p style="margin: 0 0 4px 0;">© ${new Date().getFullYear()} Plugin Compass. All rights reserved.</p>
|
||||
<p style="margin: 0;"><a href="${escapeHtml(PUBLIC_BASE_URL || '')}">${escapeHtml(PUBLIC_BASE_URL || '') || 'Visit our website'}</a> | <a href="${escapeHtml(PUBLIC_BASE_URL || '' || '')}/privacy">Privacy</a> | <a href="${escapeHtml(PUBLIC_BASE_URL || '' || '')}/terms">Terms</a></p>
|
||||
</td>
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user