fix api desc

This commit is contained in:
jxxghp 2024-05-05 13:51:49 +08:00
parent 360a54581f
commit 73bdca282c

View File

@ -23,13 +23,13 @@ def read(
return DownloadChain().downloading() return DownloadChain().downloading()
@router.post("/", summary="添加下载", response_model=schemas.Response) @router.post("/", summary="添加下载(含媒体信息)", response_model=schemas.Response)
def download( def download(
media_in: schemas.MediaInfo, media_in: schemas.MediaInfo,
torrent_in: schemas.TorrentInfo, torrent_in: schemas.TorrentInfo,
current_user: User = Depends(get_current_active_user)) -> Any: current_user: User = Depends(get_current_active_user)) -> Any:
""" """
添加下载任务 添加下载任务含媒体信息
""" """
# 元数据 # 元数据
metainfo = MetaInfo(title=torrent_in.title, subtitle=torrent_in.description) metainfo = MetaInfo(title=torrent_in.title, subtitle=torrent_in.description)
@ -51,12 +51,12 @@ def download(
}) })
@router.post("/add", summary="添加下载", response_model=schemas.Response) @router.post("/add", summary="添加下载(不含媒体信息)", response_model=schemas.Response)
def add( def add(
torrent_in: schemas.TorrentInfo, torrent_in: schemas.TorrentInfo,
current_user: User = Depends(get_current_active_user)) -> Any: current_user: User = Depends(get_current_active_user)) -> Any:
""" """
添加下载任 添加下载任不含媒体信息
""" """
# 元数据 # 元数据
metainfo = MetaInfo(title=torrent_in.title, subtitle=torrent_in.description) metainfo = MetaInfo(title=torrent_in.title, subtitle=torrent_in.description)