gendesign/backend/app/api/v1/users.py

30 lines
844 B
Python

"""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",
}