From 2fc18fb44bd12152d206105e75f20d347afa64bb Mon Sep 17 00:00:00 2001 From: jxxghp Date: Tue, 13 Jun 2023 21:09:01 +0800 Subject: [PATCH] fix Sonarr --- app/api/servarr.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/app/api/servarr.py b/app/api/servarr.py index 2121a123..994b59b6 100644 --- a/app/api/servarr.py +++ b/app/api/servarr.py @@ -444,18 +444,6 @@ async def arr_series(apikey: str) -> Any: ) -@arr_router.get("/series/{tid}") -async def arr_serie(apikey: str) -> Any: - """ - 查询Sonarr剧集 - """ - if not apikey or apikey != settings.API_TOKEN: - raise HTTPException( - status_code=403, - detail="认证失败!", - ) - - @arr_router.get("/series/lookup") async def arr_series_lookup(apikey: str, term: str) -> Any: """ @@ -468,7 +456,19 @@ async def arr_series_lookup(apikey: str, term: str) -> Any: ) -@arr_router.put("/series") +@arr_router.get("/series/{tid}") +async def arr_serie(apikey: str) -> Any: + """ + 查询Sonarr剧集 + """ + if not apikey or apikey != settings.API_TOKEN: + raise HTTPException( + status_code=403, + detail="认证失败!", + ) + + +@arr_router.post("/series") async def arr_add_series(apikey: str, title: str, seasons: list, year: int) -> Any: """ 新增Sonarr剧集订阅