diff --git a/bravo_api/__init__.py b/bravo_api/__init__.py index 4947321..f4202b4 100644 --- a/bravo_api/__init__.py +++ b/bravo_api/__init__.py @@ -86,6 +86,7 @@ def create_app(test_config=None): variant_routes.bp.before_request(auth_routes.agreement_required) region_routes.bp.before_request(auth_routes.agreement_required) gene_routes.bp.before_request(auth_routes.agreement_required) + eqtl.bp.before_request(auth_routes.agreement_required) # Setup routes to blueprints. Prefix "ui" are routes for the Vue user interface. app.register_blueprint(status.bp, url_prefix='/ui') diff --git a/bravo_api/blueprints/eqtl/eqtl.py b/bravo_api/blueprints/eqtl/eqtl.py index 980a254..3fd366a 100644 --- a/bravo_api/blueprints/eqtl/eqtl.py +++ b/bravo_api/blueprints/eqtl/eqtl.py @@ -1,5 +1,4 @@ from flask import current_app, Blueprint, jsonify, make_response, Response -from flask_cors import CORS from webargs import fields from webargs.flaskparser import FlaskParser from marshmallow import RAISE @@ -8,7 +7,6 @@ logger = logging.getLogger(__name__) bp = Blueprint('eqtl', __name__) -CORS(bp) class Parser(FlaskParser): @@ -25,9 +23,9 @@ class Parser(FlaskParser): } ensg_argmap = { - 'ensembl': fields.Str(required=True, validate=lambda x: len(x) > 15 and len(x) < 20, - error_messages={ - 'validator_failed': 'String length must be between 16 and 19.'}) + 'ensembl': fields.Str(required=True, validate=lambda x: len(x) > 12 and len(x) < 17, + error_messages={ + 'validator_failed': 'String length must be between 13 and 16.'}) } diff --git a/bravo_api/blueprints/structvar/structvar.py b/bravo_api/blueprints/structvar/structvar.py index ecc4ae1..5661a8b 100644 --- a/bravo_api/blueprints/structvar/structvar.py +++ b/bravo_api/blueprints/structvar/structvar.py @@ -1,14 +1,12 @@ import logging import pymongo from flask import current_app, Blueprint, jsonify, make_response, Response -from flask_cors import CORS from webargs import fields from webargs.flaskparser import FlaskParser from marshmallow import RAISE logger = logging.getLogger(__name__) bp = Blueprint('structvar', __name__) -CORS(bp) class Parser(FlaskParser):