aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-11-30 11:29:53 +0300
committerBonfaceKilz2023-11-30 11:35:53 +0300
commit83966632e1ceb269644500e7876a15fd1d16a876 (patch)
treed712f1989afb3533b2c3d1c8d149ebd6080b2e99 /wqflask
parentbcf3d7701da7879096de4c628b8890c602a26dbe (diff)
downloadgenenetwork2-83966632e1ceb269644500e7876a15fd1d16a876.tar.gz
Update phenotype retrieval route, incorporate group parameter.
* wqflask/wqflask/views.py (get_phenotype): Add "group" parameter. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/views.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 0bec85f4..34574c10 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -1133,7 +1133,10 @@ def get_publication(name):
@app.route("/phenotypes/<name>", methods=('GET',))
-def get_phenotype(name):
+@app.route("/phenotypes/<group>/<name>", methods=('GET',))
+def get_phenotype(name, group=None):
+ if group:
+ name = f"{group}_{name}"
metadata = requests.get(
urljoin(
GN3_LOCAL_URL,