From 10ee1c4311c44b46e6fd56e8fc8f66e7bd3761bf Mon Sep 17 00:00:00 2001 From: Stephanie Gredell Date: Mon, 8 Dec 2025 00:23:19 -0800 Subject: [PATCH] clean up console.logs --- backend/src/controllers/videos.controller.ts | 6 ------ backend/src/middleware/validation.ts | 3 --- 2 files changed, 9 deletions(-) diff --git a/backend/src/controllers/videos.controller.ts b/backend/src/controllers/videos.controller.ts index a6e3e2c..9c59e35 100644 --- a/backend/src/controllers/videos.controller.ts +++ b/backend/src/controllers/videos.controller.ts @@ -6,15 +6,11 @@ import { refreshMultipleChannels, isRefreshInProgress, setRefreshInProgress } fr export async function getAllVideos(req: AuthRequest, res: Response) { try { - console.log('[CONTROLLER] req.query:', req.query); - // Zod validation already coerced these to numbers const { page = 1, limit = 12, channelId, search, sort = 'newest' } = req.query as any; - console.log('[CONTROLLER] page:', page, 'type:', typeof page); const pageNum = page as number; const limitNum = limit as number; const offset = (pageNum - 1) * limitNum; - console.log('[CONTROLLER] pageNum:', pageNum, 'limitNum:', limitNum, 'offset:', offset); // Build query let whereClause = 'v.duration_seconds >= 600'; @@ -179,9 +175,7 @@ async function refreshAllChannelsAsync() { const channelIds = channels.rows.map(row => row.id as string); if (channelIds.length > 0) { - console.log(`[AUTO-REFRESH] Starting refresh of ${channelIds.length} channels...`); const result = await refreshMultipleChannels(channelIds, true); - console.log(`[AUTO-REFRESH] Complete: ${result.success} succeeded, ${result.failed} failed`); } } catch (error) { console.error('[AUTO-REFRESH] Error:', error); diff --git a/backend/src/middleware/validation.ts b/backend/src/middleware/validation.ts index bc7fefa..d33b2c3 100644 --- a/backend/src/middleware/validation.ts +++ b/backend/src/middleware/validation.ts @@ -21,12 +21,9 @@ export const videoQuerySchema = z.object({ export function validateRequest(schema: z.ZodSchema) { return (req: Request, res: Response, next: NextFunction) => { try { - console.log('[VALIDATION] Before validation:', req.query); const validated = schema.parse(req.method === 'GET' ? req.query : req.body); - console.log('[VALIDATION] After validation:', validated); if (req.method === 'GET') { req.query = validated as any; - console.log('[VALIDATION] Set req.query to:', req.query); } else { req.body = validated; }