my-favs/backend/app/routers/categorize.py
RamonCalvo a1f33e2046 feat: add LLM-based bookmark categorization and README
Cron-triggered endpoint that uses Claude to auto-categorize
uncategorized bookmarks. Includes full project documentation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 18:37:29 -06:00

13 lines
379 B
Python

from fastapi import APIRouter, Depends
from sqlalchemy.ext.asyncio import AsyncSession
from app.categorizer import categorize_pending
from app.database import get_db
router = APIRouter(tags=["categorize"])
@router.post("/api/categorize")
async def run_categorize(db: AsyncSession = Depends(get_db)):
count = await categorize_pending(db)
return {"categorized": count}