完成了增加学生接口

This commit is contained in:
wolin_liyujie
2026-09-21 17:53:12 +08:00
parent 4d811348ac
commit 8b0cdbdb10
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ from schemas.student import StudentCreate
from sqlalchemy.orm import Session
student_router = APIRouter()
@student_router.post("/student")
@student_router.post("")
def create_student(request:StudentCreate,db:Session = Depends(get_db)):
d = request.model_dump()
r = create_students(d,db)
+1 -1
View File
@@ -12,7 +12,7 @@ from api.class_api import classes_router
app.include_router(classes_router,tags=['班级接口'],prefix="/classes")
#-------------李玉杰--------------
app.include_router(student_router,tags=['学生接口'])
app.include_router(student_router,tags=['学生接口'],prefix="/students")
#-------------张义---------------
#-------------薄鑫---------------