Skip to content

Commit

Permalink
Merge branch 'master' of github.com:thirdeye-dev/thirdeye into 0x0ell…
Browse files Browse the repository at this point in the history
…iot/stop-contract-monitoring
  • Loading branch information
0x0elliot committed Nov 8, 2023
2 parents f158d9a + 8c031aa commit d956343
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
8 changes: 4 additions & 4 deletions backend/authentication/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,18 +162,18 @@ def github_login(request):
REPLACEMENT_DOMAIN = "localhost:3000"

if settings.DEMO_INSTANCE:
REPLACEMENT_DOMAIN = settings.API_DOMAIN
REPLACEMENT_DOMAIN = settings.FRONTEND_DOMAIN

# REPLACEMENT_DOMAIN += "/api
REPLACEMENT_DOMAIN += "/api"

current_domain = request.get_host()

redirect_uri = request.build_absolute_uri(reverse("oauth_github_callback")).replace(
current_domain, REPLACEMENT_DOMAIN
)

# if settings.DEMO_INSTANCE:
# redirect_uri = redirect_uri.replace("http://", "https://")
if settings.DEMO_INSTANCE:
redirect_uri = redirect_uri.replace("http://", "https://")

try:
return oauth.github.authorize_redirect(request, redirect_uri)
Expand Down
8 changes: 5 additions & 3 deletions backend/backend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@

API_URL = f"http://{API_DOMAIN}/"

FRONTEND_URL_MAIN = "https://thirdeyelabs.xyz/"
FRONTEND_URL_IPFS = "https://ipfs.thirdeyelabs.xyz/"
FRONTEND_DOMAIN = "demo.thirdeyelabs.xyz"
FRONTEND_URL_MAIN = f"https://{FRONTEND_DOMAIN}/"

FRONTEND_URL = (
FRONTEND_URL_IPFS
FRONTEND_URL_MAIN
if DEMO_INSTANCE
else os.environ.get("FRONTEND_URL", "http://localhost:3000/")
)
Expand Down Expand Up @@ -312,3 +312,5 @@
{"url": "http://localhost:3000/", "description": "Localhost API base URL"},
],
}

# Some change
2 changes: 2 additions & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# ThirdEye

This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started
Expand Down

0 comments on commit d956343

Please sign in to comment.