From 077fd3cdc650c07840d5ed16622d030f9fb38bbf Mon Sep 17 00:00:00 2001 From: wwwwwwwww <526125649@qq.com> Date: Tue, 16 Jun 2026 10:25:00 +0800 Subject: [PATCH] 1 --- video-gen-api/app/api/v1/admin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/video-gen-api/app/api/v1/admin.py b/video-gen-api/app/api/v1/admin.py index 506ad5ba..4672cadb 100644 --- a/video-gen-api/app/api/v1/admin.py +++ b/video-gen-api/app/api/v1/admin.py @@ -80,7 +80,7 @@ router = APIRouter(prefix="/admin", tags=["admin"]) @router.get("/users") async def list_users( page: int = Query(1, ge=1), - page_size: int = Query(20, ge=1, le=500), + page_size: int = Query(20, ge=1, le=1000), search: str = Query(""), admin: User = Depends(get_admin_user), db: AsyncSession = Depends(get_db), @@ -320,9 +320,9 @@ async def list_admin_notifications( admin: User = Depends(get_admin_user), db: AsyncSession = Depends(get_db), ): - """List all notifications (including broadcasts) with optional user_id filter.""" - query = select(Notification).order_by(Notification.created_at.desc()) - count_query = select(func.count(Notification.id)) + """List unread notifications with optional user_id filter.""" + query = select(Notification).where(Notification.is_read == False).order_by(Notification.created_at.desc()) + count_query = select(func.count(Notification.id)).where(Notification.is_read == False) if user_id: query = query.where(Notification.user_id == user_id)