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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user