kenken999's picture
test
cf75111
raw
history blame
426 Bytes
from fastapi import APIRouter, Depends
from polls import adapters
from polls.models import Choice
from polls.schemas import FastChoice, FastChoices
router = APIRouter(prefix="/choisssssssssces", tags=["choices"])
@router.get("/dzssssssssssssssssssssss", response_model=FastChoices)
def get_choices(
choices: List[Choice] = Depends(adapters.retrieve_choices),
) -> FastChoices:
return FastChoices.from_qs(choices)