about summary refs log tree commit diff
path: root/gn3/auth/db_utils.py
diff options
context:
space:
mode:
authorJohn Nduli2024-10-18 15:06:36 +0300
committerFrederick Muriuki Muriithi2024-10-18 09:28:40 -0500
commit86b81be8c67cf82e8f26a7f84cbdc5df7198e214 (patch)
tree7e27fe0d5876d6c473b61bcacf5e73a9a8d83a39 /gn3/auth/db_utils.py
parent27531c0a1350097ca36a555b8546bc282948de04 (diff)
downloadgenenetwork3-86b81be8c67cf82e8f26a7f84cbdc5df7198e214.tar.gz
refactor: replace gn3.auth.db with gn3.sqlite_db_utils and drop all refs to gn3.auth
Diffstat (limited to 'gn3/auth/db_utils.py')
-rw-r--r--gn3/auth/db_utils.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/gn3/auth/db_utils.py b/gn3/auth/db_utils.py
deleted file mode 100644
index c06b026..0000000
--- a/gn3/auth/db_utils.py
+++ /dev/null
@@ -1,14 +0,0 @@
-"""Some common auth db utilities"""
-from typing import Any, Callable
-from flask import current_app
-
-from . import db
-
-def with_db_connection(func: Callable[[db.DbConnection], Any]) -> Any:
-    """
-    Takes a function of one argument `func`, whose one argument is a database
-    connection.
-    """
-    db_uri = current_app.config["AUTH_DB"]
-    with db.connection(db_uri) as conn:
-        return func(conn)