From 475c8e0ffca0b0df0a4be0733bf7018d23279e87 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Tue, 31 Oct 2023 17:47:44 +0100 Subject: [PATCH] disable message --- app/routers/users.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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