增加urlprotocol配置保存的处理

增加urlprotocol配置保存的处理
pull/124/head
horizonlin 2018-12-11 14:30:11 +08:00 committed by GitHub
parent dcf33358ca
commit e963a59db0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -252,6 +252,18 @@ class DoSaveCfgHandler(TPBaseJsonHandler):
tp_cfg().sys_smtp_password = _password
else:
return self.write_json(err)
#增加urlprotocol的配置
if 'global' in args:
processed = True
_cfg = args['global']
_url_proto = _cfg['url_proto']
err = system_model.save_config(self, '更新全局设置', 'global', _cfg)
if err == TPE_OK:
tp_cfg().sys.glob.url_proto = _url_proto
else:
return self.write_json(err)
if 'password' in args:
processed = True