Skip to content

Commit

Permalink
Troubleshooting mongoengine issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nnayk committed Dec 8, 2023
1 parent 1792c41 commit 5caea84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Backend/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ def store_image():
image_res = requests.post(
"https://api.imgur.com/3/image",
data={"image": data["url"]},
headers={"Authorization": "Client-ID "
+ os.environ["IMGUR_CLIENT_ID"]},
headers={"Authorization": "Client-ID " +
os.environ["IMGUR_CLIENT_ID"]},
)

# Prepare the data for creating an image
Expand Down Expand Up @@ -255,6 +255,7 @@ def login():

@app.route("/register", methods=["POST"])
def register():
print("IN REGISTER!!!")
data = request.get_json()

# Validate required fields
Expand Down
2 changes: 1 addition & 1 deletion Backend/db_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
def db_connect(DB_URL=None):
# MongoDB connection
mongo_uri = DB_URL or os.environ.get("MONGO_URI")
connect(host=mongo_uri)
connect(alias="default", host=mongo_uri)
return True


Expand Down

0 comments on commit 5caea84

Please sign in to comment.