完成了增加学生接口
This commit is contained in:
+1
-1
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
#-------------张义---------------
|
||||
|
||||
#-------------薄鑫---------------
|
||||
|
||||
Reference in New Issue
Block a user