fix(api): use proper Pydantic models in vendor themes/domains
vendor_themes.py: - Return ThemePresetListResponse instead of raw dict (API-001 fix) - Add ThemePresetResponse response_model to apply_theme_preset - Add ThemeDeleteResponse response_model to delete endpoint vendor_domain.py: - Remove _get_vendor_by_id helper with direct DB query - Use vendor_service.get_vendor_by_id() instead (API-002 fix) models/schema/vendor_theme.py: - Add ThemeDeleteResponse model for delete endpoint response 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -100,3 +100,9 @@ class ThemePresetListResponse(BaseModel):
|
||||
"""List of available theme presets."""
|
||||
|
||||
presets: list[ThemePresetPreview] = Field(..., description="Available presets")
|
||||
|
||||
|
||||
class ThemeDeleteResponse(BaseModel):
|
||||
"""Response after deleting a theme."""
|
||||
|
||||
message: str = Field(..., description="Success message")
|
||||
|
||||
Reference in New Issue
Block a user