aboutsummaryrefslogtreecommitdiff
path: root/gn_auth/auth/authorisation/resources/inbredset/views.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-09-16 15:20:23 -0500
committerFrederick Muriuki Muriithi2024-09-16 15:20:23 -0500
commitc1785a946638e094903fe0261ccc865530298dc2 (patch)
treeea1e1dd15006cfb8fd0b2a4a75cabdfee007cb13 /gn_auth/auth/authorisation/resources/inbredset/views.py
parent3c47081696e5a81f70e4ed509267725bc904434c (diff)
downloadgn-auth-c1785a946638e094903fe0261ccc865530298dc2.tar.gz
Rename blueprint and register it one level lower
Register the populations/inbredset blueprint with the "resources" blueprint rather than at the higher level "auth" blueprint to retain the hierarchy of the blueprints and make maintenance arguably easier.
Diffstat (limited to 'gn_auth/auth/authorisation/resources/inbredset/views.py')
-rw-r--r--gn_auth/auth/authorisation/resources/inbredset/views.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gn_auth/auth/authorisation/resources/inbredset/views.py b/gn_auth/auth/authorisation/resources/inbredset/views.py
index 444c442..d565533 100644
--- a/gn_auth/auth/authorisation/resources/inbredset/views.py
+++ b/gn_auth/auth/authorisation/resources/inbredset/views.py
@@ -4,9 +4,10 @@ from flask import jsonify, Response, Blueprint
from gn_auth.auth.db import sqlite3 as db
from gn_auth.auth.db.sqlite3 import with_db_connection
-iset = Blueprint("inbredset", __name__)
+popbp = Blueprint("populations", __name__)
-@iset.route("/resource-id/<int:speciesid>/<int:inbredsetid>")
+@popbp.route("/populations/resource-id/<int:speciesid>/<int:inbredsetid>",
+ methods=["GET"])
def resource_id_by_inbredset_id(speciesid: int, inbredsetid: int) -> Response:
"""Retrieve the resource ID for resource attached to the inbredset."""
def __res_by_iset_id__(conn):