Add HTTP exception helpers and update models
Introduced utils/http/http_exceptions.py with common HTTP exception helpers for FastAPI. Updated main.py to use a global exception handler that logs and hides internal errors. Refined models/README.md to document new models and relationships, including PhysicalFile and UploadSession, and updated DTO and enum documentation. Simplified ThemeResponse in models/color.py. Improved models/download.py with type annotations, index changes, and import optimizations. Fixed a parameter type in clean.py. Co-Authored-By: 砂糖橘 <54745033+Foxerine@users.noreply.github.com>
This commit is contained in:
@@ -3,29 +3,5 @@ from .base import SQLModelBase
|
||||
class ThemeResponse(SQLModelBase):
|
||||
"""主题响应 DTO"""
|
||||
|
||||
primary: str = "#3f51b5"
|
||||
"""主色调"""
|
||||
|
||||
secondary: str = "#f50057"
|
||||
"""次要色"""
|
||||
|
||||
accent: str = "#9c27b0"
|
||||
"""强调色"""
|
||||
|
||||
dark: str = "#1d1d1d"
|
||||
"""深色"""
|
||||
|
||||
dark_page: str = "#121212"
|
||||
"""深色页面背景"""
|
||||
|
||||
positive: str = "#21ba45"
|
||||
"""正面/成功色"""
|
||||
|
||||
negative: str = "#c10015"
|
||||
"""负面/错误色"""
|
||||
|
||||
info: str = "#31ccec"
|
||||
"""信息色"""
|
||||
|
||||
warning: str = "#f2c037"
|
||||
"""警告色"""
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user