from fastapi import APIRouter, Depends
from sqlalchemy.orm import Session

from .. import models, schemas
from ..database import get_db

router = APIRouter(prefix="/api/recommendations", tags=["recommendations"])


@router.get("", response_model=list[schemas.RecommendationOut])
def list_recommendations(db: Session = Depends(get_db)):
    return db.query(models.Recommendation).order_by(models.Recommendation.id).all()
