pull/628/head
Mr Chen 7 months ago
parent 97800e3424
commit b121d08503
  1. 9
      web/admin/plugins/__init__.py
  2. 2
      web/utils/mwplugin.py

@ -104,14 +104,13 @@ def set_index():
def install():
name = request.form.get('name', '')
version = request.form.get('version', '')
msg_head = '安装'
upgrade = None
if hasattr(request.form, 'upgrade'):
mtype = 'update'
msg_head = '更新'
upgrade = True
pg = MwPlugin.instance()
return pg.install(name, version)
return pg.install(name, version, upgrade=upgrade)
# 插件卸载
@blueprint.route('/uninstall', endpoint='uninstall', methods=['POST'])

@ -174,7 +174,7 @@ class MwPlugin(object):
return mw.returnData(False, '缺少版本信息!', ())
msg_head = '安装'
if upgrade is not None:
if upgrade is not None and upgrade is True:
mtype = 'update'
msg_head = '更新'

Loading…
Cancel
Save