From 30d11eace02707f783c6d6fab57fdd7a974aa043 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 7 Aug 2022 00:17:19 +0800 Subject: [PATCH] up --- plugins/mysql/index.py | 4 ++-- plugins/mysql/js/mysql.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index 63c30a2ef..c6780a128 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -1241,7 +1241,7 @@ def setDbAccess(): __createUser(dbname, name, password, access) - psdb.where('username=?', (name,)).save('accept', (access,)) + psdb.where('username=?', (name,)).save('accept,rw', (access, 'rw',)) return mw.returnJson(True, '设置成功!') @@ -1283,7 +1283,7 @@ def setDbRw(version=''): pdb.execute("flush privileges") r = psdb.where("id=?", (uid,)).setField('rw', rw) # print(r) - return mw.returnJson(True, '设置成功!') + return mw.returnJson(True, '切换成功!') def getDbInfo(): diff --git a/plugins/mysql/js/mysql.js b/plugins/mysql/js/mysql.js index abff1a8f6..22a65f160 100755 --- a/plugins/mysql/js/mysql.js +++ b/plugins/mysql/js/mysql.js @@ -606,6 +606,7 @@ function setDbAccess(username){ var rdata = $.parseJSON(data.data); showMsg(rdata.msg,function(){ layer.close(index); + dbList(); },{icon: rdata.status ? 1 : 2}); }); }