From 803d0330a18da6c5649ac3b4f33a65c4460c5137 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Sat, 14 Oct 2023 18:29:07 +0200 Subject: [PATCH] fix delete user --- app/routers/users.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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