From 9b39f101c27ecc265d47cb7fc3c22d749ef8410b Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Tue, 2 Sep 2025 13:44:14 +0000 Subject: [PATCH] Increase the number of videos displayed in the admin panel Update the default limit for fetching videos in the admin panel from 50 to 500, and display the total number of videos available. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 170e18f0-0f13-4eca-8643-546bba1dd8cc Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/170e18f0-0f13-4eca-8643-546bba1dd8cc/OcXjVeJ --- client/src/pages/admin.tsx | 6 +++--- server/routes.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/pages/admin.tsx b/client/src/pages/admin.tsx index b13cfa2..4c79989 100644 --- a/client/src/pages/admin.tsx +++ b/client/src/pages/admin.tsx @@ -126,9 +126,9 @@ function VideoManagement({ onOpenDialog: (open: boolean) => void; }) { const { data, isLoading } = useQuery({ - queryKey: ["/api/admin/videos", { search, limit: 50 }], + queryKey: ["/api/admin/videos", { search, limit: 500 }], queryFn: async () => { - const response = await apiRequest("GET", `/api/admin/videos?limit=50&search=${encodeURIComponent(search)}`); + const response = await apiRequest("GET", `/api/admin/videos?limit=500&search=${encodeURIComponent(search)}`); return response.json(); }, }); @@ -149,7 +149,7 @@ function VideoManagement({ - Video Management ({videos.length}) + Video Management ({videos.length} of {data?.total || videos.length}) diff --git a/server/routes.ts b/server/routes.ts index 07dbd69..393b613 100644 --- a/server/routes.ts +++ b/server/routes.ts @@ -892,7 +892,7 @@ export async function registerRoutes(app: Express): Promise { // Admin video management app.get('/api/admin/videos', isAdmin, async (req, res) => { try { - const limit = parseInt(req.query.limit as string) || 50; + const limit = parseInt(req.query.limit as string) || 500; // Increased default limit for admin const offset = parseInt(req.query.offset as string) || 0; const search = req.query.search as string;