From 2f9903753f572050b4901c963ecee01f7079c297 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Sat, 18 May 2024 02:57:32 +0800 Subject: [PATCH] Update index.py --- plugins/mongodb/index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/mongodb/index.py b/plugins/mongodb/index.py index 68e41c6ef..2517afd98 100755 --- a/plugins/mongodb/index.py +++ b/plugins/mongodb/index.py @@ -618,7 +618,7 @@ def addDb(): username = data_name - client[data_name].chat.insert_one({}) + client[data_name].zchat.insert_one({}) user_roles = [{'role': 'dbOwner', 'db': data_name}, {'role': 'userAdmin', 'db': data_name}] if auth_status: # db.command("dropUser", username) @@ -803,7 +803,7 @@ def toDbBase(find): data_name = find['name'] db = client[data_name] - db.chat.insert_one({}) + db.zchat.insert_one({}) user_roles = [{'role': 'dbOwner', 'db': data_name}, {'role': 'userAdmin', 'db': data_name}] try: db_admin.command("createUser", find['username'], pwd=find['password'], roles=user_roles)