feat(sf-b2): GET /users/me/recent-parcels (stub, real impl post-auth)

This commit is contained in:
lekss361 2026-05-18 00:01:22 +03:00
parent e872b1ebe4
commit e19d4862c2
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

@ -26,6 +26,7 @@ from app.api.v1 import (
parcels,
photos,
trade_in,
users,
)
from app.core.config import settings
from app.observability.sentry_scrub import scrub_sensitive_query
@ -99,6 +100,7 @@ app.include_router(
tags=["admin", "etl"],
)
app.include_router(trade_in.router, prefix="/api/v1/trade-in", tags=["trade-in"])
app.include_router(users.router, prefix="/api/v1", tags=["users"])
@app.get("/health")