Fix ReferenceError: handleAdminTopupOptions is not defined

- Added missing closing brace for handleTopupConfirm function
- Removed extra closing brace after handleAdminMe function
- Admin functions (handleAdminTopupOptions, handleAdminTopupCheckout, handleAdminTopupConfirm) were incorrectly nested inside handleTopupConfirm scope, making them inaccessible to the router
This commit is contained in:
Developer
2026-02-14 20:38:22 +00:00
parent 4fa0a1b737
commit a6a5d8f7a0

View File

@@ -13245,6 +13245,7 @@ async function handleTopupConfirm(req, res, url) {
log('top-up confirmation failed', { error: String(error), userId: user?.id, sessionId });
return sendJson(res, 400, { error: error.message || 'Unable to confirm payment' });
}
}
// -------------------------
// Admin test endpoints for Dodo top-ups
@@ -13451,7 +13452,6 @@ async function handleAdminMe(req, res) {
if (!session) return;
return sendJson(res, 200, { ok: true, admin: { username: ADMIN_USER || 'admin' } });
}
}
function resolvePaygProduct(currency = 'usd') {
const normalized = String(currency || 'usd').toLowerCase();