diff --git a/app/routers/users.py b/app/routers/users.py index edc8b08..770f045 100644 --- a/app/routers/users.py +++ b/app/routers/users.py @@ -112,14 +112,16 @@ async def delete_users_groups(current_user: Annotated[users.User, Depends(users_ ) user_repository = users.UserRepository(database=database.database) + content = {"roles":user.roles,"message": "users are disabled"} for i in userids: user = user_repository.find_one_by_id(ObjectId(i)) user.status = 0 if remove is True: user.status = -1 + content = {"roles":user.roles,"message": "users are deleted "} user_repository.save(current_user) - content = {"roles":user.roles,"message": "Access token generated"} + response = JSONResponse(content=content) return response