Spaces:
Running
on
Zero
Running
on
Zero
te
Browse files- routers/router/router.py +4 -9
routers/router/router.py
CHANGED
@@ -1,16 +1,11 @@
|
|
1 |
from fastapi import APIRouter, Depends
|
2 |
|
3 |
-
from polls import adapters
|
4 |
-
from polls.models import Choice
|
5 |
-
from polls.schemas import FastChoice, FastChoices
|
6 |
|
7 |
|
8 |
|
9 |
-
router = APIRouter(prefix="/
|
10 |
|
11 |
|
12 |
-
@router.get("/
|
13 |
-
def
|
14 |
-
|
15 |
-
) -> FastChoices:
|
16 |
-
return FastChoices.from_qs(choices)
|
|
|
1 |
from fastapi import APIRouter, Depends
|
2 |
|
|
|
|
|
|
|
3 |
|
4 |
|
5 |
|
6 |
+
router = APIRouter(prefix="/routerssample", tags=["choices"])
|
7 |
|
8 |
|
9 |
+
@router.get("/sample")
|
10 |
+
def test():
|
11 |
+
return True
|
|
|
|