# backend/app/routers/journey.py
from fastapi import APIRouter, Depends
from sqlmodel import Session

from ..db import get_session
from ..schemas import JourneyOut
from ..services.journey import build_journey

router = APIRouter()  # prefix 없음. main.py 에서 prefix="/api".


@router.get("/journey", response_model=JourneyOut)
def get_journey(s: Session = Depends(get_session)):
    return build_journey(s)
