disable message
This commit is contained in:
parent
6cc12e0535
commit
475c8e0ffc
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user