From c501db800e5cc19bddc6a4f8237b76b5dd2b3a8b Mon Sep 17 00:00:00 2001 From: "Waylon S. Walker" Date: Thu, 22 Jun 2023 10:10:37 -0500 Subject: [PATCH] no async fastapi --- learn_sql_model/api/hero.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/learn_sql_model/api/hero.py b/learn_sql_model/api/hero.py index f4c4fa6..ac98077 100644 --- a/learn_sql_model/api/hero.py +++ b/learn_sql_model/api/hero.py @@ -15,7 +15,7 @@ def on_startup() -> None: @hero_router.get("/hero/{hero_id}") -async def get_hero( +def get_hero( *, session: Session = Depends(get_session), hero_id: int, @@ -28,7 +28,7 @@ async def get_hero( @hero_router.post("/hero/") -async def post_hero( +def post_hero( *, session: Session = Depends(get_session), hero: HeroCreate, @@ -43,7 +43,7 @@ async def post_hero( @hero_router.patch("/hero/") -async def patch_hero( +def patch_hero( *, session: Session = Depends(get_session), hero: HeroUpdate, @@ -62,7 +62,7 @@ async def patch_hero( @hero_router.delete("/hero/{hero_id}") -async def delete_hero( +def delete_hero( *, session: Session = Depends(get_session), hero_id: int, @@ -78,7 +78,7 @@ async def delete_hero( @hero_router.get("/heros/") -async def get_heros( +def get_heros( *, session: Session = Depends(get_session), ) -> Heros: