mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-11-01 12:56:34 +08:00
fix(types): annotate torrent cache endpoints
This commit is contained in:
@@ -29,7 +29,9 @@ router = ResponseAPIRouter()
|
||||
summary="获取种子缓存",
|
||||
response_model=_SchemaResponse[_SchemaTorrentCacheData],
|
||||
)
|
||||
async def torrents_cache(_: object = Depends(get_current_active_superuser_async)):
|
||||
async def torrents_cache(
|
||||
_: object = Depends(get_current_active_superuser_async),
|
||||
) -> _SchemaResponse[_SchemaTorrentCacheData]:
|
||||
"""
|
||||
获取当前种子缓存数据
|
||||
"""
|
||||
@@ -101,7 +103,7 @@ async def delete_cache(
|
||||
domain: str,
|
||||
torrent_hash: str,
|
||||
_: object = Depends(get_current_active_superuser_async),
|
||||
):
|
||||
) -> _SchemaResponse[None]:
|
||||
"""
|
||||
删除指定的种子缓存
|
||||
:param domain: 站点域名
|
||||
@@ -144,7 +146,9 @@ async def delete_cache(
|
||||
|
||||
|
||||
@router.delete("/cache", summary="清理种子缓存", response_model=_SchemaResponse[None])
|
||||
async def clear_cache(_: object = Depends(get_current_active_superuser_async)):
|
||||
async def clear_cache(
|
||||
_: object = Depends(get_current_active_superuser_async),
|
||||
) -> _SchemaResponse[None]:
|
||||
"""
|
||||
清理所有种子缓存
|
||||
"""
|
||||
@@ -158,7 +162,9 @@ async def clear_cache(_: object = Depends(get_current_active_superuser_async)):
|
||||
|
||||
|
||||
@router.post("/cache/refresh", summary="刷新种子缓存", response_model=_SchemaResponse[None])
|
||||
def refresh_cache(_: object = Depends(get_current_active_superuser)):
|
||||
def refresh_cache(
|
||||
_: object = Depends(get_current_active_superuser),
|
||||
) -> _SchemaResponse[None]:
|
||||
"""
|
||||
刷新种子缓存
|
||||
"""
|
||||
@@ -193,7 +199,7 @@ async def reidentify_cache(
|
||||
media_id: Optional[str] = None,
|
||||
music_type: Optional[MusicTargetEntityType] = None,
|
||||
_: object = Depends(get_current_active_superuser_async),
|
||||
):
|
||||
) -> _SchemaResponse[_SchemaTorrentReidentifyData]:
|
||||
"""
|
||||
重新识别指定的种子
|
||||
:param domain: 站点域名
|
||||
|
||||
Reference in New Issue
Block a user