diff --git a/app/routers/users.py b/app/routers/users.py index d7947ae..d924877 100644 --- a/app/routers/users.py +++ b/app/routers/users.py @@ -62,7 +62,7 @@ async def read_users_me(current_user: Annotated[users.User, Depends(users_token. current_user.disabled = True if remove is True: current_user.removed = True - user_repository.update(current_user) + user_repository.save(current_user) return current_user @router.delete("/users/{item_id}", tags=["users"], response_model=users.User) @@ -72,5 +72,5 @@ async def read_users_id(item_id : str, authorize: Annotated[bool, Depends(permis user.disabled = True if remove is True: user.removed = True - user_repository.update(user) + user_repository.save(user) return user