Switched API
This commit is contained in:
parent
27fd95ba1e
commit
1eafc1a0e1
6 changed files with 21 additions and 6 deletions
support_formatter/routes
|
@ -1,7 +1,8 @@
|
|||
# pylint: disable=wrong-import-position,cyclic-import
|
||||
from flask_smorest import Blueprint
|
||||
|
||||
redirect_routes = Blueprint("redirect", "recirects", url_prefix="/", description="")
|
||||
interface_routes = Blueprint("interface", "interface", url_prefix="/", description="")
|
||||
formatter_routes = Blueprint("formatter", "formatter", url_prefix="/", description="")
|
||||
|
||||
from . import interface, upload # avoids circular imports problem
|
||||
from . import interface, upload, redirects # avoids circular imports problem
|
||||
|
|
12
support_formatter/routes/redirects.py
Normal file
12
support_formatter/routes/redirects.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from flask import redirect
|
||||
|
||||
from ..app import Application
|
||||
from ..config import APISettings
|
||||
from . import redirect_routes as blp
|
||||
|
||||
APP = Application.get_instance()
|
||||
|
||||
@blp.route("/", methods=["GET"])
|
||||
@blp.doc(summary="This route just exists to redirect any visitor to the root domain to the UI")
|
||||
def redirect_to_ui():
|
||||
return redirect(APISettings.UI_URL)
|
Loading…
Add table
Add a link
Reference in a new issue