Loading portal/api/rest.py +12 −0 Changes for portal/api/rest.py: 12 added lines, 0 removed lines. Original line number Diff line number Diff line from flask import render_template from .blueprint import bp from ..problem_details import not_found @bp.get("/<path:_>") def fallback_not_found(_): """ If you can't find a matching API endpoint, fallback to returning a 404. We completely ignore the provided path (hence the argument name "_" and not something useful), because if this method is ever reached, we already know the only viable response is a 404. """ return not_found() @bp.get("/") Loading Loading
portal/api/rest.py +12 −0 Changes for portal/api/rest.py: 12 added lines, 0 removed lines. Original line number Diff line number Diff line from flask import render_template from .blueprint import bp from ..problem_details import not_found @bp.get("/<path:_>") def fallback_not_found(_): """ If you can't find a matching API endpoint, fallback to returning a 404. We completely ignore the provided path (hence the argument name "_" and not something useful), because if this method is ever reached, we already know the only viable response is a 404. """ return not_found() @bp.get("/") Loading