Commit 515002a8 authored by Hervé Ménager's avatar Hervé Ménager
Browse files

add CORS to facilitate development

parent d1490469
......@@ -11,7 +11,7 @@ from jass.config import config
from jass.models.phenotype import get_available_phenotypes
from jass.models.project import Project
from jass.tasks import create_project
from flask_cors import CORS
class PhenotypeSchema(ma.Schema):
id = ma.fields.String()
......@@ -63,10 +63,14 @@ blp_phenotypes = Blueprint(
description="Operations on phenotypes",
)
CORS(blp_phenotypes)
blp_projects = Blueprint(
"projects", "projects", url_prefix="/projects", description="Operations on projects"
)
CORS(blp_projects)
blp_local_projects = Blueprint(
"local_projects",
"local_projects",
......@@ -74,6 +78,8 @@ blp_local_projects = Blueprint(
description="Operations on local projects",
)
CORS(blp_local_projects)
def get_phenotypes():
return get_available_phenotypes(os.path.join(config["DATA_DIR"], "initTable.hdf5"))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment