This endpoint should fetch only an order visible to the current user without blocking the event loop. Find the two boundary bugs.
Python
from fastapi import FastAPI
app = FastAPI()
@app.get("/orders/{order_id}")
async def read_order(order_id: int):
order = sync_session.get(Order, order_id)
return {"id": order.id, "total_cents": order.total_cents}