mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
refactor(api): standardize responses and restore media config contracts
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
"""存储授权 API 输出模型。"""
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class StorageQrCodeData(BaseModel):
|
||||
"""云存储扫码授权二维码。"""
|
||||
|
||||
codeContent: Optional[str] = Field(default=None, description="二维码原始内容")
|
||||
codeUrl: Optional[str] = Field(default=None, description="二维码图片地址")
|
||||
|
||||
|
||||
class StorageAuthUrlData(BaseModel):
|
||||
"""云存储 OAuth 授权入口。"""
|
||||
|
||||
authUrl: str = Field(description="授权地址")
|
||||
state: str = Field(description="授权状态校验值")
|
||||
|
||||
|
||||
class StorageLoginStatusData(BaseModel):
|
||||
"""云存储扫码或 OAuth 登录状态。"""
|
||||
|
||||
status: int | str = Field(description="授权状态")
|
||||
tip: str = Field(description="状态提示")
|
||||
Reference in New Issue
Block a user