28 lines
1.1 KiB
Python
28 lines
1.1 KiB
Python
from flask_restful import Resource, Api
|
|
|
|
from app.api.apache_restart import ApacheRestartFlag
|
|
from app.api.config import Config, ConfigTest
|
|
from app.api.infobases import InfobasesAvailable, InfobasesAll
|
|
from app.api.module import EnterpriseModule
|
|
from app.api.publications import Publications, Publication, PublicationURL
|
|
|
|
|
|
class APIIndex(Resource):
|
|
def get(self):
|
|
return ['infobases-available', 'infobases-all', 'publications',
|
|
'module', 'config', 'config-test', 'apache-restart']
|
|
|
|
|
|
def add_api_resources(api: Api) -> None:
|
|
api.add_resource(InfobasesAvailable, '/infobases-available')
|
|
api.add_resource(InfobasesAll, '/infobases-all')
|
|
api.add_resource(Publications, '/publications', '/publications/')
|
|
api.add_resource(Publication, '/publications/<string:name>')
|
|
api.add_resource(PublicationURL, '/publications/<string:name>/url')
|
|
api.add_resource(EnterpriseModule, '/module')
|
|
api.add_resource(Config, '/config')
|
|
api.add_resource(ConfigTest, '/config-test')
|
|
api.add_resource(ApacheRestartFlag, '/apache-restart')
|
|
api.add_resource(APIIndex, '/')
|
|
|