Spaces:
Running
on
Zero
Running
on
Zero
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"]) | |
def get_choices( | |
choices: List[Choice] = Depends(adapters.retrieve_choices), | |
) -> FastChoices: | |
return FastChoices.from_qs(choices) |