fix delete user
This commit is contained in:
parent
ecc6e7642f
commit
803d0330a1
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user