Fix API prefix.
This commit is contained in:
parent
17709f8f47
commit
c5a73623cf
@ -23,6 +23,7 @@ from flask_sqlalchemy import SQLAlchemy
|
|||||||
# The app
|
# The app
|
||||||
app = Flask(__name__, static_folder=None, template_folder=None)
|
app = Flask(__name__, static_folder=None, template_folder=None)
|
||||||
|
|
||||||
|
# Configure it from config.cfg.
|
||||||
app.config.from_pyfile('config.cfg')
|
app.config.from_pyfile('config.cfg')
|
||||||
|
|
||||||
app.config['SQLALCHEMY_ECHO'] = app.debug
|
app.config['SQLALCHEMY_ECHO'] = app.debug
|
||||||
@ -40,13 +41,8 @@ authorizations = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
api = Api(app, doc='/doc/', authorizations=authorizations)
|
api = Api(app, authorizations=authorizations, prefix='/api')
|
||||||
CORS(app)
|
CORS(app)
|
||||||
|
|
||||||
# Load all views.
|
# Load all views.
|
||||||
from .views import * # flake8: noqa
|
from .views import * # flake8: noqa
|
||||||
|
|
||||||
# Redirect / to API documentation.
|
|
||||||
@app.route('/')
|
|
||||||
def index():
|
|
||||||
return redirect(url_for('doc'))
|
|
||||||
|
Loading…
Reference in New Issue
Block a user