feat(sf-b2): GET /users/me/recent-parcels — stub endpoint (auth TODO) #329
2 changed files with 32 additions and 0 deletions
30
backend/app/api/v1/users.py
Normal file
30
backend/app/api/v1/users.py
Normal 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",
|
||||
}
|
||||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue