mehr spacken
This commit is contained in:
parent
ac2ab19a76
commit
1431101fcd
1 changed files with 25 additions and 1 deletions
|
@ -1,11 +1,12 @@
|
|||
import asyncio
|
||||
|
||||
from fastapi import APIRouter
|
||||
from fastapi import APIRouter, HTTPException, status
|
||||
|
||||
router = APIRouter(prefix="/abspacken", tags=["abspacken"])
|
||||
|
||||
|
||||
async def get_kurix(kgs: float) -> float:
|
||||
# die berechnung ist sehr aufwändig, braucht lange!
|
||||
await asyncio.sleep(2)
|
||||
|
||||
return kgs / 1.13
|
||||
|
@ -25,3 +26,26 @@ async def uwe(
|
|||
@router.get("/torsten/{ding}")
|
||||
async def torsten(ding: str) -> str:
|
||||
return "Der Alphakevin Torsten hat ein " f"langes {ding}."
|
||||
|
||||
|
||||
@router.get(
|
||||
"/kys",
|
||||
responses={
|
||||
status.HTTP_200_OK: {
|
||||
"description": "Success",
|
||||
"content": None,
|
||||
},
|
||||
status.HTTP_418_IM_A_TEAPOT: {
|
||||
"description": "Commit Sudoku",
|
||||
"content": None,
|
||||
}
|
||||
}
|
||||
)
|
||||
async def kys() -> None:
|
||||
"""
|
||||
Sinnlose Todesdrohungen.
|
||||
|
||||
Heiße Botschaften aus der Nachbarschaft warten auf Sie.
|
||||
"""
|
||||
|
||||
raise HTTPException(status.HTTP_418_IM_A_TEAPOT, "Go kill yourself")
|
||||
|
|
Loading…
Reference in a new issue