From 160167a85df3ba1a6c98fc0637ff59686b2c16ef Mon Sep 17 00:00:00 2001 From: Federico Pacheco Date: Thu, 18 Apr 2024 00:51:44 -0300 Subject: [PATCH] fix async/sync functions --- app/main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/main.py b/app/main.py index 763f6bb..3bfe499 100644 --- a/app/main.py +++ b/app/main.py @@ -13,22 +13,22 @@ @app.get("/") -async def root(): +def root(): return {"message": "Hello World"} @app.get("/users/{user_id}") -async def get_users(user_id: int): +def get_users(user_id: int): return users_controller.handle_get_user(user_id) @app.get("/users") -async def get_all_users(): +def get_all_users(): return users_controller.handle_get_all_users() @app.post("/users") -async def create_user(user_data: CreateUserSchema): +def create_user(user_data: CreateUserSchema): return users_controller.handle_create_user(user_data.dict()) @@ -38,5 +38,5 @@ def login_with_google(request: LoginRequest): @app.patch("/users/{user_id}") -async def update_user(user_id: int, update_data: UpdateUserSchema): +def update_user(user_id: int, update_data: UpdateUserSchema): return users_controller.handle_update_user(user_id, update_data.dict())