Skip to content

Commit

Permalink
Merge pull request #676 from midoks/dev
Browse files Browse the repository at this point in the history
面板修改用户名修复
  • Loading branch information
midoks authored Dec 26, 2024
2 parents 245923d + 8de4e6a commit 047d84a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ PyMySQL>=1.0.2
whitenoise==5.3.0
pyotp
pytz
supervisor
pyTelegramBotAPI
telebot
pyyaml
pyyaml
17 changes: 11 additions & 6 deletions scripts/old/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,24 @@ fi

if [ "$LOCAL_ADDR" != "common" ];then
# curl --insecure -sSLo /tmp/master.zip https://code.midoks.icu/midoks/mdserver-web/archive/master.zip
wget --no-check-certificate -O /tmp/master.zip github.com/midoks/mdserver-web/archive/refs/tags/${VERSION}.zip
wget --no-check-certificate -O /tmp/master.zip https://github.com/midoks/mdserver-web/archive/refs/tags/${VERSION}.zip
cd /tmp && unzip /tmp/master.zip

$CP_CMD -rf /tmp/mdserver-web/* /www/server/mdserver-web
$CP_CMD -rf /tmp/mdserver-web-${VERSION}/* /www/server/mdserver-web
rm -rf /tmp/master.zip
rm -rf /tmp/mdserver-web
rm -rf /tmp/mdserver-web-${VERSION}

pip install -r /www/server/mdserver-web/requirements.txt
else
curl --insecure -sSLo /tmp/master.zip https://codeload.github.com/midoks/mdserver-web/zip/master
# curl --insecure -sSLo /tmp/master.zip https://github.com/midoks/mdserver-web/archive/refs/tags/0.17.3.zip
curl --insecure -sSLo /tmp/master.zip https://github.com/midoks/mdserver-web/archive/refs/tags/${VERSION}.zip

cd /tmp && unzip /tmp/master.zip
$CP_CMD -rf /tmp/mdserver-web-master/* /www/server/mdserver-web
$CP_CMD -rf /tmp/mdserver-web-${VERSION}/* /www/server/mdserver-web
rm -rf /tmp/master.zip
rm -rf /tmp/mdserver-web-master
rm -rf /tmp/mdserver-web-${VERSION}

pip install -r /www/server/mdserver-web/requirements.txt
fi


Expand Down
2 changes: 1 addition & 1 deletion web/thisdb/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def setUserByRoot(name = None,password = None) -> bool:
'''
data = {}
if name is not None:
mw.M('users').where('id=?', (1,)).setField('username', name)
mw.M('users').where('id=?', (1,)).setField('name', name)

if password is not None:
pwd = mw.md5(password)
Expand Down

0 comments on commit 047d84a

Please sign in to comment.