Skip to content

Commit

Permalink
backend url
Browse files Browse the repository at this point in the history
  • Loading branch information
shamith09 committed Oct 7, 2024
1 parent 97930e8 commit d821e41
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .env.production
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
GENERATE_SOURCEMAP=false
REACT_APP_BACKEND_URL=https://plexfinance-backend-production.up.railway.app
REACT_APP_BACKEND_URL=https://plexfinance.up.railway.app
13 changes: 8 additions & 5 deletions server/bluevine.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
import pymongo
import logging

logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
logging.basicConfig(
level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s"
)

load_dotenv()

Expand All @@ -37,6 +39,7 @@ def login(
bluevineEmail=None,
bluevinePassword=None,
):
logging.warning(s.headers)
# login
res = s.post(
"https://app.bluevine.com/api/v3/auth/login/",
Expand Down Expand Up @@ -98,11 +101,11 @@ def after_login(
request_id,
description=None,
):
logging.info('after_login started')
logging.info("after_login started")

i = 0
while not len(list(db.MFA.find({}))):
logging.info('waiting for mfa')
logging.info("waiting for mfa")
sleep(1)
if i > 60:
return {"error": "mfa timeout"}, 400
Expand All @@ -115,7 +118,7 @@ def after_login(
{"token": code, "trust_device": True},
headers={"referer": "https://app.bluevine.com/dashboard"},
)
logging.info('verify mfa: %s', res.text)
logging.info("verify mfa: %s", res.text)

# if not res.ok:
# return {"error": "bad mfa"}, 400
Expand Down Expand Up @@ -175,7 +178,7 @@ def after_login(
"x-csrftoken": s.cookies["csrftoken"],
},
)
logging.info('send money: %s', res.text)
logging.info("send money: %s", res.text)

if res.status_code == 428:
res = s.post(
Expand Down

0 comments on commit d821e41

Please sign in to comment.