merge: resolve main.py conflict (keep both pilot + users routers)

This commit is contained in:
lekss361 2026-05-18 00:08:48 +03:00
commit bf55cc9e56
2 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,30 @@
"""Users endpoints.
GET /api/v1/users/me/recent-parcels история недавно просмотренных участков.
STUB: возвращает пустой список до реализации NextAuth (Wave 3).
"""
from __future__ import annotations
import logging
from typing import Annotated
from fastapi import APIRouter, Query
logger = logging.getLogger(__name__)
router = APIRouter()
@router.get("/users/me/recent-parcels")
def get_recent_parcels(
limit: Annotated[int, Query(ge=1, le=50)] = 10,
) -> dict:
"""STUB. Real impl после NextAuth (Wave 3) — будет читать parcel_analysis_history table."""
logger.info("recent-parcels stub called, limit=%d", limit)
return {
"items": [],
"total": 0,
"stub": True,
"real_impl_after": "NextAuth",
}

View file

@ -27,6 +27,7 @@ from app.api.v1 import (
photos,
pilot,
trade_in,
users,
)
from app.core.config import settings
from app.observability.sentry_scrub import scrub_sensitive_query
@ -101,6 +102,7 @@ app.include_router(
)
app.include_router(trade_in.router, prefix="/api/v1/trade-in", tags=["trade-in"])
app.include_router(pilot.router, prefix="/api/v1/pilot", tags=["pilot"])
app.include_router(users.router, prefix="/api/v1", tags=["users"])
@app.get("/health")