From 6a6d25d492f5bee1fd15812a387401c00de6701a Mon Sep 17 00:00:00 2001 From: nnayk <79224511+nnayk@users.noreply.github.com> Date: Thu, 7 Dec 2023 23:29:54 -0800 Subject: [PATCH] Remove old db_connect --- Backend/db_access.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Backend/db_access.py b/Backend/db_access.py index 3376536..7e509eb 100644 --- a/Backend/db_access.py +++ b/Backend/db_access.py @@ -22,15 +22,13 @@ app = Flask(__name__) -CONNECTION = None - @app.before_request -def db_connect(DB_URL=None, connection=None): +def db_connect(DB_URL=None): # MongoDB connection mongo_uri = DB_URL or os.environ.get("MONGO_URI") connect(alias="default", host=mongo_uri) - return connection + return True class Response: