fix 304 codes

This commit is contained in:
Dmitry Belyaev 2021-09-22 15:18:25 +03:00
parent 3d3d3df19f
commit 7f87191f2a
Signed by: b4tman
GPG Key ID: 41A00BF15EA7E5F3

View File

@ -314,7 +314,7 @@ class EnterpriseModule(Resource):
def put(self):
webpub = get_webpub1c()
if webpub.has_module():
abort(304, message='already added')
return '', 304
webpub.add_module()
return {
'message': 'success'
@ -335,7 +335,7 @@ class ApacheRestartFlag(Resource):
cfg = get_config()
flagfile = cfg.get('apache_restart_flagfile', apache_restart_flagfile)
if os.path.isfile(flagfile):
abort(304, message='found')
return '', 304
with open(flagfile, 'a'):
pass
return {