Skip to content

Commit

Permalink
[Community] add landing links
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeDSM committed Sep 25, 2023
1 parent 81cc937 commit 18382c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions octobot/community/identifiers_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

class IdentifiersProvider:
ENABLED_ENVIRONMENT: str = None
COMMUNITY_LANDING_URL: str = None
COMMUNITY_URL: str = None
FRONTEND_PASSWORD_RECOVER_URL: str = None
BACKEND_URL: str = None
Expand All @@ -29,6 +30,7 @@ class IdentifiersProvider:
@staticmethod
def use_production():
IdentifiersProvider.COMMUNITY_URL = constants.OCTOBOT_COMMUNITY_URL
IdentifiersProvider.COMMUNITY_LANDING_URL = constants.OCTOBOT_COMMUNITY_LANDING_URL
IdentifiersProvider.FRONTEND_PASSWORD_RECOVER_URL = constants.OCTOBOT_COMMUNITY_RECOVER_PASSWORD_URL
IdentifiersProvider.BACKEND_URL = constants.COMMUNITY_BACKEND_URL
IdentifiersProvider.BACKEND_KEY = constants.COMMUNITY_BACKEND_KEY
Expand All @@ -37,6 +39,7 @@ def use_production():
@staticmethod
def use_staging():
IdentifiersProvider.COMMUNITY_URL = constants.STAGING_OCTOBOT_COMMUNITY_URL
IdentifiersProvider.COMMUNITY_LANDING_URL = constants.STAGING_OCTOBOT_COMMUNITY_LANDING_URL
IdentifiersProvider.FRONTEND_PASSWORD_RECOVER_URL = constants.STAGING_COMMUNITY_RECOVER_PASSWORD_URL
IdentifiersProvider.BACKEND_URL = constants.STAGING_COMMUNITY_BACKEND_URL
IdentifiersProvider.BACKEND_KEY = constants.STAGING_COMMUNITY_BACKEND_KEY
Expand Down
2 changes: 2 additions & 0 deletions octobot/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
COMMUNITY_FEED_DEFAULT_TYPE = octobot.enums.CommunityFeedType.SupabaseFeed

# production env SHOULD ONLY BE USED THROUGH CommunityIdentifiersProvider
OCTOBOT_COMMUNITY_LANDING_URL = os.getenv("COMMUNITY_SERVER_URL", "https://octobot.cloud")
OCTOBOT_COMMUNITY_URL = os.getenv("COMMUNITY_SERVER_URL", "https://app.octobot.cloud")
OCTOBOT_COMMUNITY_RECOVER_PASSWORD_URL = OCTOBOT_COMMUNITY_URL
# todo use real production db
Expand All @@ -69,6 +70,7 @@


# staging env SHOULD ONLY BE USED THROUGH CommunityIdentifiersProvider
STAGING_OCTOBOT_COMMUNITY_LANDING_URL = os.getenv("COMMUNITY_SERVER_URL", "https://beta.octobot.cloud")
STAGING_OCTOBOT_COMMUNITY_URL = os.getenv("COMMUNITY_SERVER_URL", "https://app-beta.octobot.cloud/")
STAGING_COMMUNITY_RECOVER_PASSWORD_URL = STAGING_OCTOBOT_COMMUNITY_URL
STAGING_COMMUNITY_BACKEND_URL = os.getenv("COMMUNITY_BACKEND_URL", "https://wmfkgvgzokyzhvxowbyg.supabase.co")
Expand Down

0 comments on commit 18382c1

Please sign in to comment.