|
|
|
@ -177,23 +177,41 @@ def _version ():
|
|
|
|
|
_handler = _route.get()
|
|
|
|
|
global _config
|
|
|
|
|
return _handler.system()['version']
|
|
|
|
|
@_app.route('/reload',methods=['POST'])
|
|
|
|
|
def reload():
|
|
|
|
|
@_app.route("/reload/<key>")
|
|
|
|
|
def _reload(key) :
|
|
|
|
|
global _route
|
|
|
|
|
|
|
|
|
|
_handler = _route.get_main()
|
|
|
|
|
_system = _handler.system()
|
|
|
|
|
_key = request.headers['key'] if 'key' in request.headers else None
|
|
|
|
|
if not 'source' in _system :
|
|
|
|
|
_systemKey = None
|
|
|
|
|
elif 'key' in _system['source'] and _system['source']['key']:
|
|
|
|
|
_systemKey = _system['source']['key']
|
|
|
|
|
print ([_key,_systemKey,_systemKey == _key])
|
|
|
|
|
if _key and _systemKey and _systemKey == _key :
|
|
|
|
|
print ([key,_systemKey,_systemKey == key])
|
|
|
|
|
if key and _systemKey and _systemKey == key :
|
|
|
|
|
_handler.reload()
|
|
|
|
|
return "",200
|
|
|
|
|
pass
|
|
|
|
|
return "",403
|
|
|
|
|
|
|
|
|
|
@_app.route('/reload',methods=['POST'])
|
|
|
|
|
def reload():
|
|
|
|
|
# global _route
|
|
|
|
|
|
|
|
|
|
# _handler = _route.get_main()
|
|
|
|
|
# _system = _handler.system()
|
|
|
|
|
_key = request.headers['key'] if 'key' in request.headers else None
|
|
|
|
|
return _reload(_key)
|
|
|
|
|
# if not 'source' in _system :
|
|
|
|
|
# _systemKey = None
|
|
|
|
|
# elif 'key' in _system['source'] and _system['source']['key']:
|
|
|
|
|
# _systemKey = _system['source']['key']
|
|
|
|
|
# print ([_key,_systemKey,_systemKey == _key])
|
|
|
|
|
# if _key and _systemKey and _systemKey == _key :
|
|
|
|
|
# _handler.reload()
|
|
|
|
|
# return "",200
|
|
|
|
|
# pass
|
|
|
|
|
# return "",403
|
|
|
|
|
@_app.route('/page',methods=['POST'])
|
|
|
|
|
def cms_page():
|
|
|
|
|
"""
|
|
|
|
|