refactor: remove personal_rating, DRY get_or_404, fix ty errors
- Drop Product.personal_rating from model, API schemas, and all frontend views (list table, detail view, quick-edit form, new-product form) - Extract get_or_404 into backend/innercontext/api/utils.py; remove five duplicate copies from individual API modules - Fix all ty type errors: generic get_or_404 with TypeVar, cast() in coerce_effect_profile validator, col() for ilike on SQLModel column, dict[str, Any] annotation in test helper, ty: ignore for CORSMiddleware Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5e3c0c97e5
commit
6333c6678a
15 changed files with 30 additions and 81 deletions
|
|
@ -20,7 +20,7 @@ async def lifespan(app: FastAPI):
|
|||
app = FastAPI(title="innercontext API", lifespan=lifespan, redirect_slashes=False)
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
CORSMiddleware, # ty: ignore[invalid-argument-type]
|
||||
allow_origins=["*"],
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue