mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-08-28 19:47:41 +08:00
feat(site): add POST /site/cookie/{site_id} endpoint for updating site Cookie&UA via request body
- Introduce SiteCookieUpdate schema for structured cookie update requests - Add POST endpoint to update site Cookie&UA using JSON body - Refactor cookie update logic into shared _update_site_cookie function - Update SKILL.md to document new endpoint and endpoint count - Add tests for both POST and legacy GET cookie update endpoints
This commit is contained in:
@@ -115,6 +115,15 @@ class SiteAuth(BaseModel):
|
||||
params: Optional[Dict[str, Union[int, str]]] = Field(default_factory=dict)
|
||||
|
||||
|
||||
class SiteCookieUpdate(BaseModel):
|
||||
"""
|
||||
站点 Cookie 与 UA 更新请求。
|
||||
"""
|
||||
username: str = Field(..., description="站点登录用户名")
|
||||
password: str = Field(..., description="站点登录密码")
|
||||
code: Optional[str] = Field(None, description="二步验证码或密钥")
|
||||
|
||||
|
||||
class SiteCategory(BaseModel):
|
||||
id: Optional[int] = None
|
||||
cat: Optional[str] = None
|
||||
|
||||
Reference in New Issue
Block a user