From a6a5d8f7a05e5a0319cdc1ac3e45cecc66f71a58 Mon Sep 17 00:00:00 2001 From: Developer Date: Sat, 14 Feb 2026 20:38:22 +0000 Subject: [PATCH] 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 --- chat/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chat/server.js b/chat/server.js index b8d21e7..0a2983b 100644 --- a/chat/server.js +++ b/chat/server.js @@ -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();