feat 支持站点单个删除

This commit is contained in:
thsrite 2023-08-16 12:48:53 +08:00
parent 15ab5ce70d
commit 2e2c281748

View File

@ -52,16 +52,16 @@ def update_site(
return schemas.Response(success=True) return schemas.Response(success=True)
@router.delete("/", summary="删除站点", response_model=schemas.Response) @router.delete("/{site_id}", summary="删除站点", response_model=schemas.Response)
def delete_site( def delete_site(
site_in: schemas.Site, site_id: int,
db: Session = Depends(get_db), db: Session = Depends(get_db),
_: schemas.TokenPayload = Depends(verify_token) _: schemas.TokenPayload = Depends(verify_token)
) -> Any: ) -> Any:
""" """
删除站点 删除站点
""" """
Site.delete(db, site_in.id) Site.delete(db, site_id)
return schemas.Response(success=True) return schemas.Response(success=True)