Skip to content

Commit

Permalink
Remove old db_connect
Browse files Browse the repository at this point in the history
  • Loading branch information
nnayk committed Dec 8, 2023
1 parent eeea28b commit 6a6d25d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Backend/db_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 6a6d25d

Please sign in to comment.