bug修改
This commit is contained in:
+2
-2
@@ -11,7 +11,7 @@ from sqlalchemy.orm import Session
|
||||
statistics_router=APIRouter()
|
||||
|
||||
|
||||
@statistics_router.get("/scores/age-over-30",response_model=SuccessResponse)
|
||||
@statistics_router.get("/students/age-over-30",response_model=SuccessResponse)
|
||||
def api_age_over_thirty(db:Session=Depends(get_db)):
|
||||
try:
|
||||
age_over_thirty_list=age_over_thirty(Student,db)
|
||||
@@ -71,7 +71,7 @@ def employ_time(db:Session=Depends(get_db)):
|
||||
@statistics_router.get("/employments/class-average-duration",response_model=SuccessResponse)
|
||||
def avg_employ_time(db:Session=Depends(get_db)):
|
||||
try:
|
||||
result = avg_class(Employment,Student,db)
|
||||
result = avg_emptime(Employment,Student,db)
|
||||
return SuccessResponse(status_code=200,msg=result)
|
||||
except NoExist as e:
|
||||
raise HTTPException(status_code=404,detail=str(e))
|
||||
|
||||
Reference in New Issue
Block a user