INNER CODE UNIT · Python

redir

Mailu/Mailu · core/admin/mailu/api/__init__.py:20

        def redir():
            return redirect(url_for(f'{APIv1.blueprint.name}.root'))
        app.register_blueprint(redirect_api, url_prefix=f'{web_api_root}')

        # swagger ui config
        app.config.SWAGGER_UI_DOC_EXPANSION = 'list'
        app.config.SWAGGER_UI_OPERATION_ID = True
        app.config.SWAGGER_UI_REQUEST_DURATION = True
        app.config.RESTX_MASK_SWAGGER = False
    else:
        api = Blueprint('api', __name__)
        @api.route('/', defaults={'path': ''})
        @api.route('/<path:path>')
        def api_token_missing(path):
            return "<p>Error: API_TOKEN is not configured</p>", 500
        app.register_blueprint(api, url_prefix=f'{web_api_root}')

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…