aaredb/backend/app/routers/proposal.py
2024-12-16 10:41:56 +01:00

15 lines
435 B
Python

# app/routers/proposal.py
from fastapi import APIRouter, Depends
from sqlalchemy.orm import Session
from typing import List
from app.schemas import Proposal as ProposalSchema
from app.models import Proposal as ProposalModel
from app.dependencies import get_db
router = APIRouter()
@router.get("/", response_model=List[ProposalSchema])
async def get_proposals(db: Session = Depends(get_db)):
return db.query(ProposalModel).all()