fastapi-sqlalchemy
fastapi-sqlalchemy copied to clipboard
Routing does not need to be connected database through dependency injection ?
@router.get("/metaEvents/{event_id}") async def get_one( event_id: int, db: Session = Depends(deps.get_db), ):
How to make sure the database session is always closed after the request. Even if there was an exception while processing the request.