Disable frontend in flask app, redirect to swagger doc instead of frontend index.
This commit is contained in:
parent
8f28d14201
commit
24bd0ddecc
@ -30,13 +30,13 @@ db = SQLAlchemy(app)
|
|||||||
|
|
||||||
# Must be after db declaration because some components in blueprints need it.
|
# Must be after db declaration because some components in blueprints need it.
|
||||||
from .api import blueprint as api
|
from .api import blueprint as api
|
||||||
from .frontend import blueprint as frontend
|
#from .frontend import blueprint as frontend
|
||||||
|
|
||||||
app.register_blueprint(frontend, url_prefix='/app')
|
#app.register_blueprint(frontend, url_prefix='/app')
|
||||||
app.register_blueprint(api, url_prefix='/api')
|
app.register_blueprint(api, url_prefix='/api')
|
||||||
|
|
||||||
|
|
||||||
# Redirect / to frontend index.
|
# Redirect / to frontend index.
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
def index():
|
def index():
|
||||||
return redirect(url_for('frontend.index'))
|
return redirect(url_for('api.doc'))
|
||||||
|
Loading…
Reference in New Issue
Block a user