my-favs/backend/app/routers/categorize.py
RamonCalvo 2a314af419 feat: add Firebase Auth with Google sign-in
Frontend guard shows login screen for unauthenticated users.
Backend verifies Firebase ID tokens on all protected endpoints.

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

14 lines
458 B
Python

from fastapi import APIRouter, Depends
from sqlalchemy.ext.asyncio import AsyncSession
from app.auth import get_current_user
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), _user: dict = Depends(get_current_user)):
count = await categorize_pending(db)
return {"categorized": count}