about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-07-29 14:42:10 -0500
committerFrederick Muriuki Muriithi2025-07-29 14:42:10 -0500
commit37456060798ec087bcde92e8f048d9db74937b09 (patch)
tree90ec536ffa2ee03288d66686011807b2e93b2f40
parent94d211e354e7be675857e3aacd1734f3164a371e (diff)
downloadgn-auth-37456060798ec087bcde92e8f048d9db74937b09.tar.gz
Fix issues caught by the type-checker.
-rw-r--r--gn_auth/auth/authorisation/resources/common.py6
-rw-r--r--gn_auth/auth/authorisation/resources/views.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/gn_auth/auth/authorisation/resources/common.py b/gn_auth/auth/authorisation/resources/common.py
index 1842982..5a48704 100644
--- a/gn_auth/auth/authorisation/resources/common.py
+++ b/gn_auth/auth/authorisation/resources/common.py
@@ -1,10 +1,10 @@
 """Utilities common to more than one resource."""
 import uuid
 
-from sqlite3 import Cursor
+from gn_auth.auth.db import sqlite3 as db
 
 def assign_resource_owner_role(
-        cursor: Cursor,
+        cursor: db.DbCursor,
         resource_id: uuid.UUID,
         user_id: uuid.UUID
 ) -> dict:
@@ -25,7 +25,7 @@ def assign_resource_owner_role(
 
 
 def grant_access_to_sysadmins(
-        cursor: Cursor,
+        cursor: db.DbCursor,
         resource_id: uuid.UUID,
         system_resource_id: uuid.UUID
 ):
diff --git a/gn_auth/auth/authorisation/resources/views.py b/gn_auth/auth/authorisation/resources/views.py
index c4774dc..f39cc59 100644
--- a/gn_auth/auth/authorisation/resources/views.py
+++ b/gn_auth/auth/authorisation/resources/views.py
@@ -678,7 +678,7 @@ def user_resource_roles(resource_id: UUID, user_id: UUID):
 
 @resources.route("/delete", methods=["POST"])
 @require_oauth("profile group resource")
-def delete_resource() -> Response:
+def delete_resource():
     """Delete the specified resource, if possible."""
     with (require_oauth.acquire("profile group resource") as the_token,
           db.connection(app.config["AUTH_DB"]) as conn):