Skip to content

Commit

Permalink
fix async/sync functions
Browse files Browse the repository at this point in the history
  • Loading branch information
fjpacheco committed Apr 18, 2024
1 parent 4236140 commit 160167a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())


Expand All @@ -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())

0 comments on commit 160167a

Please sign in to comment.