Skip to content

Commit

Permalink
Add flask db connect b4 first request
Browse files Browse the repository at this point in the history
  • Loading branch information
nnayk committed Dec 8, 2023
1 parent 5caea84 commit e5d4e2b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Backend/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
jwt = JWTManager(app)


@app.before_first_request
def before_first_request():
db_access.db_connect()


@app.route("/generate_image", methods=["POST"])
@jwt_required()
def generate_image():
Expand Down

0 comments on commit e5d4e2b

Please sign in to comment.