fix 304 codes
This commit is contained in:
parent
3d3d3df19f
commit
7f87191f2a
@ -314,7 +314,7 @@ class EnterpriseModule(Resource):
|
|||||||
def put(self):
|
def put(self):
|
||||||
webpub = get_webpub1c()
|
webpub = get_webpub1c()
|
||||||
if webpub.has_module():
|
if webpub.has_module():
|
||||||
abort(304, message='already added')
|
return '', 304
|
||||||
webpub.add_module()
|
webpub.add_module()
|
||||||
return {
|
return {
|
||||||
'message': 'success'
|
'message': 'success'
|
||||||
@ -335,7 +335,7 @@ class ApacheRestartFlag(Resource):
|
|||||||
cfg = get_config()
|
cfg = get_config()
|
||||||
flagfile = cfg.get('apache_restart_flagfile', apache_restart_flagfile)
|
flagfile = cfg.get('apache_restart_flagfile', apache_restart_flagfile)
|
||||||
if os.path.isfile(flagfile):
|
if os.path.isfile(flagfile):
|
||||||
abort(304, message='found')
|
return '', 304
|
||||||
with open(flagfile, 'a'):
|
with open(flagfile, 'a'):
|
||||||
pass
|
pass
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user