diff --git a/pychunkedgraph/app/segmentation/common.py b/pychunkedgraph/app/segmentation/common.py index 61d037a14..ee9da61c1 100644 --- a/pychunkedgraph/app/segmentation/common.py +++ b/pychunkedgraph/app/segmentation/common.py @@ -117,6 +117,10 @@ def handle_api_versions(): return jsonify(__api_versions__) +def handle_version(): + return jsonify(__version__) + + ### GET ROOT ------------------------------------------------------------------- @@ -599,7 +603,7 @@ def handle_leaves(table_id, root_id): user_id = str(g.auth_user.get("id", current_app.user_id)) stop_layer = int(request.args.get("stop_layer", 1)) - + bounding_box = _get_bounds_from_request(request) cg = app_utils.get_cg(table_id) diff --git a/pychunkedgraph/app/segmentation/generic/routes.py b/pychunkedgraph/app/segmentation/generic/routes.py index d9da7cfd8..b67597c3d 100644 --- a/pychunkedgraph/app/segmentation/generic/routes.py +++ b/pychunkedgraph/app/segmentation/generic/routes.py @@ -2,14 +2,14 @@ from flask import Blueprint from middle_auth_client import ( - auth_requires_admin, auth_required, + auth_requires_admin, auth_requires_permission, ) from pychunkedgraph.app import common as app_common -from pychunkedgraph.app.segmentation import common from pychunkedgraph.app.app_utils import remap_public +from pychunkedgraph.app.segmentation import common from pychunkedgraph.graph import exceptions as cg_exceptions bp = Blueprint( @@ -87,3 +87,9 @@ def handle_info(table_id): @auth_required def handle_api_versions(): return common.handle_api_versions() + + +@bp.route("/api/version", methods=["GET"]) +@auth_required +def handle_version(): + return common.handle_version()