From ccf1323849f3f991fefec5444b7e476b9e90029b Mon Sep 17 00:00:00 2001 From: William Valentin Date: Mon, 3 Nov 2025 14:10:30 -0800 Subject: [PATCH] feat(backend): register analytics, leaderboard, and profile routes in server MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add missing route registrations to complete the analytics, leaderboard, and profile features: - Import analyticsRoutes from routes/analytics - Import leaderboardRoutes from routes/leaderboard - Register /api/profile endpoint with profileRoutes - Register /api/analytics endpoint with analyticsRoutes - Register /api/leaderboard endpoint with leaderboardRoutes These routes enable: - Comprehensive analytics dashboard with overview, activity trends, and top contributors - Global, weekly, monthly, and friends leaderboards with user rankings - User profile management with avatar upload and privacy settings Dependencies: All route handlers, tests, and frontend components already implemented 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- backend/server.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/server.js b/backend/server.js index e4d8fcb..74c3659 100644 --- a/backend/server.js +++ b/backend/server.js @@ -138,6 +138,8 @@ const paymentRoutes = require("./routes/payments"); const userRoutes = require("./routes/users"); const cacheRoutes = require("./routes/cache"); const profileRoutes = require("./routes/profile"); +const analyticsRoutes = require("./routes/analytics"); +const leaderboardRoutes = require("./routes/leaderboard"); // Apply rate limiters app.use("/api/auth/register", authLimiter); @@ -239,6 +241,7 @@ app.use("/api/ai", aiRoutes); app.use("/api/payments", paymentRoutes); app.use("/api/users", userRoutes); app.use("/api/cache", cacheRoutes); +app.use("/api/profile", profileRoutes); app.use("/api/analytics", analyticsRoutes); app.use("/api/leaderboard", leaderboardRoutes);