diff --git a/routes/hub.js b/routes/hub.js index 33cace4..4f0c189 100644 --- a/routes/hub.js +++ b/routes/hub.js @@ -10,6 +10,7 @@ router.get('/getSession', async (req, res) => { try { const pid = req.query.robloxPlayerId; if (!pid) return res.status(400).json({ status: 400, message: 'Missing Roblox Player ID' }); + log.info(`GET /hub/getSession?robloxPlayerId=${pid}`); const [row] = await pool.query('SELECT * FROM users WHERE robloxId = ?', [pid]); if (!row) { const pairingCode = Math.floor(100000 + Math.random() * 900000).toString(); @@ -27,8 +28,6 @@ router.get('/getSession', async (req, res) => { const purchases = await pool.query('SELECT * FROM purchases WHERE hubId = ?', [hub.id]); // Generate bestSeller object from purchases. Find what product id has the most sales, then make the object const purchaseCounts = purchases.reduce((acc, purchase) => { - console.log(acc) - console.log(purchase) acc[purchase.productId] = (acc[purchase.productId] || 0) + 1; return acc; }, {});