Sync fastapi docs from 50fa3f7c on 2026-01-11
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
from typing import Union
|
||||
|
||||
from fastapi import FastAPI, Response
|
||||
from fastapi.responses import RedirectResponse
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
@app.get("/portal")
|
||||
async def get_portal(teleport: bool = False) -> Union[Response, dict]:
|
||||
if teleport:
|
||||
return RedirectResponse(url="https://www.youtube.com/watch?v=dQw4w9WgXcQ")
|
||||
return {"message": "Here's your interdimensional portal."}
|
||||
Reference in New Issue
Block a user