first commit
This commit is contained in:
0
app/routers/__init__.py
Normal file
0
app/routers/__init__.py
Normal file
BIN
app/routers/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
app/routers/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
app/routers/__pycache__/command.cpython-312.pyc
Normal file
BIN
app/routers/__pycache__/command.cpython-312.pyc
Normal file
Binary file not shown.
BIN
app/routers/__pycache__/printstatus.cpython-312.pyc
Normal file
BIN
app/routers/__pycache__/printstatus.cpython-312.pyc
Normal file
Binary file not shown.
16
app/routers/command.py
Normal file
16
app/routers/command.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from fastapi import APIRouter, Depends, HTTPException
|
||||
from app.database import session
|
||||
from app.models.delivery import Delivery
|
||||
|
||||
|
||||
router = APIRouter(
|
||||
prefix="/command",
|
||||
tags=["command"],
|
||||
responses={404: {"description": "Not found"}},
|
||||
)
|
||||
|
||||
|
||||
@router.get("/")
|
||||
async def read_items():
|
||||
x = session.query(Delivery).first()
|
||||
return {"x": x.id}
|
||||
10
app/routers/printstatus.py
Normal file
10
app/routers/printstatus.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from fastapi import APIRouter, Depends, HTTPException
|
||||
|
||||
router = APIRouter(
|
||||
prefix="/status",
|
||||
tags=["status"],
|
||||
responses={404: {"description": "Not found"}},
|
||||
)
|
||||
@router.get("/")
|
||||
async def read_items():
|
||||
return {"Hello": "World"}
|
||||
Reference in New Issue
Block a user