apache_restarter
app
api
__init__.py
apache_restart.py
config.py
index.py
infobases.py
module.py
publications.py
__init__.py
app.py
brackets.py
config.py
glob.py
manager.py
utils.py
frontend
test
tests
webpub1c
.gitignore
.gitmodules
config.yml
requirements.txt
run.py
run.sh
webpub1c-admin.service
22 lines
502 B
Python
22 lines
502 B
Python
from flask_restful import Resource, abort
|
|
|
|
from app.glob import get_manager
|
|
|
|
|
|
class EnterpriseModule(Resource):
|
|
def get(self):
|
|
manager = get_manager()
|
|
if not manager.has_module():
|
|
abort(404, message='not found')
|
|
return {
|
|
'message': 'found'
|
|
}
|
|
|
|
def put(self):
|
|
manager = get_manager()
|
|
if manager.has_module():
|
|
return '', 304
|
|
manager.add_module()
|
|
return {
|
|
'message': 'success'
|
|
} |