This commit is contained in:
maruizhi
2026-09-22 22:41:22 +08:00
parent 9f87dd25d1
commit 9f0fae933f
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
from fastapi import APIRouter,HTTPException,Depends,Query
from fastapi import APIRouter, HTTPException, Depends, Query, Path
from dao.student_dao import *
from schema.student_schema import *
from util.database import get_db
@@ -53,7 +53,7 @@ def update_students(stu_id:int
return {'code':200,'totals':r,'detail':'更新成功'}
@StudentAPI.delete('/students/{stu_id}',response_model= StudelResponse,summary='学生信息删除接口',description='删除学生信息')
def del_students(stu_id:int=Query(None,description='班级编号')
def del_students(stu_id:int= Path(description='班级编号')
,db=Depends(get_db)):
rows=delete_student_dao( stu_id=stu_id,db=db )
if not rows: