From 542415cccd0018a48c7d8a378cd2db961733b4bd Mon Sep 17 00:00:00 2001 From: Deco Vander Date: Fri, 4 Jul 2025 13:30:45 -0400 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- server.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server.js b/server.js index a0a6022..811ed17 100644 --- a/server.js +++ b/server.js @@ -51,7 +51,12 @@ try { // Database management methods used by admin routes addCustomWord: (word, severity, category, createdBy) => Promise.resolve({ - success: false, + id: null, + word: word || null, + severity: severity || null, + category: category || null, + createdBy: createdBy || null, + success: false, error: 'Profanity filter not available - please check server configuration' }), removeCustomWord: (wordId) => Promise.resolve({ @@ -171,11 +176,6 @@ function setupRoutes() { } // Validate profanity filter is properly initialized before setting up routes -if (!profanityFilter) { - console.error('CRITICAL ERROR: profanityFilter is undefined after initialization attempt.'); - console.error('Cannot start server without a functional profanity filter.'); - process.exit(1); -} // Initialize routes after everything is set up setupRoutes();