From 463194da3cfc077513e98948dd31cfd60d2eb0e0 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 22 Nov 2024 10:02:40 -0600 Subject: Use code in gn_libs for MySQL/MariaDB connection. Update the application to use the gn_libs code for connecting to the database, rather than using a local module. --- gn_auth/auth/authorisation/data/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gn_auth/auth/authorisation/data/views.py') diff --git a/gn_auth/auth/authorisation/data/views.py b/gn_auth/auth/authorisation/data/views.py index 7ed69e3..38eaad6 100644 --- a/gn_auth/auth/authorisation/data/views.py +++ b/gn_auth/auth/authorisation/data/views.py @@ -11,6 +11,9 @@ from MySQLdb.cursors import DictCursor from authlib.integrations.flask_oauth2.errors import _HTTPException from flask import request, jsonify, Response, Blueprint, current_app as app + +from gn_libs import mysqldb as gn3db + from gn_auth import jobs from gn_auth.commands import run_async_cmd @@ -19,7 +22,6 @@ from gn_auth.auth.errors import InvalidData, NotFoundError from gn_auth.auth.authorisation.resources.groups.models import group_by_id from ...db import sqlite3 as db -from ...db import mariadb as gn3db from ...db.sqlite3 import with_db_connection from ..checks import require_json -- cgit v1.2.3