From 77f0a04e43e929fce5c11a81caa628cb1ba0e083 Mon Sep 17 00:00:00 2001 From: maruizhi <3088243241@qq.com> Date: Tue, 22 Sep 2026 23:18:04 +0800 Subject: [PATCH] mrz --- PythonProject/api/statistics_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PythonProject/api/statistics_api.py b/PythonProject/api/statistics_api.py index 86c09e2..400e9b4 100644 --- a/PythonProject/api/statistics_api.py +++ b/PythonProject/api/statistics_api.py @@ -17,7 +17,7 @@ def get_students(db=Depends(get_db)): return l @StatisticsAPI.get("/score",response_model=list[GetScoreResponse],summary='根据成绩查询学生信息') -def get_students(min_score:int|None=None,max_score:int|None=None,db=Depends(get_db)): +def get_students(min_score:int|None=Query(None,ge=0,le=150),max_score:int|None=Query(None,ge=0,le=150),db=Depends(get_db)): l = select_score(min_score,max_score,db) return l