You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
412 B
Python
15 lines
412 B
Python
# 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)
|