mrz
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user