chore: rename analytics env variable keys (#455)

This commit is contained in:
pablohashescobar 2023-03-22 01:33:06 +05:30 committed by GitHub
parent 7fd775ab05
commit 698718aa8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 24 deletions

View File

@ -87,12 +87,12 @@ class SignInEndpoint(BaseAPIView):
}
# Send event to Jitsu for tracking
if settings.JITSU_BASE_API:
if settings.ANALYTICS_BASE_API:
_ = requests.post(
settings.JITSU_BASE_API,
settings.ANALYTICS_BASE_API,
headers={
"Content-Type": "application/json",
"X-Auth-Token": settings.JITSU_SECRET_KEY,
"X-Auth-Token": settings.ANALYTICS_SECRET_KEY,
},
json={
"event_id": uuid.uuid4().hex,
@ -138,12 +138,12 @@ class SignInEndpoint(BaseAPIView):
access_token, refresh_token = get_tokens_for_user(user)
# Send event to Jitsu for tracking
if settings.JITSU_BASE_API:
if settings.ANALYTICS_BASE_API:
_ = requests.post(
settings.JITSU_BASE_API,
settings.ANALYTICS_BASE_API,
headers={
"Content-Type": "application/json",
"X-Auth-Token": settings.JITSU_SECRET_KEY,
"X-Auth-Token": settings.ANALYTICS_SECRET_KEY,
},
json={
"event_id": uuid.uuid4().hex,
@ -312,12 +312,12 @@ class MagicSignInEndpoint(BaseAPIView):
if User.objects.filter(email=email).exists():
user = User.objects.get(email=email)
# Send event to Jitsu for tracking
if settings.JITSU_BASE_API:
if settings.ANALYTICS_BASE_API:
_ = requests.post(
settings.JITSU_BASE_API,
settings.ANALYTICS_BASE_API,
headers={
"Content-Type": "application/json",
"X-Auth-Token": settings.JITSU_SECRET_KEY,
"X-Auth-Token": settings.ANALYTICS_SECRET_KEY,
},
json={
"event_id": uuid.uuid4().hex,
@ -342,12 +342,12 @@ class MagicSignInEndpoint(BaseAPIView):
is_password_autoset=True,
)
# Send event to Jitsu for tracking
if settings.JITSU_BASE_API:
if settings.ANALYTICS_BASE_API:
_ = requests.post(
settings.JITSU_BASE_API,
settings.ANALYTICS_BASE_API,
headers={
"Content-Type": "application/json",
"X-Auth-Token": settings.JITSU_SECRET_KEY,
"X-Auth-Token": settings.ANALYTICS_SECRET_KEY,
},
json={
"event_id": uuid.uuid4().hex,

View File

@ -205,12 +205,12 @@ class OauthEndpoint(BaseAPIView):
"last_login_at": timezone.now(),
},
)
if settings.JITSU_BASE_API:
if settings.ANALYTICS_BASE_API:
_ = requests.post(
settings.JITSU_BASE_API,
settings.ANALYTICS_BASE_API,
headers={
"Content-Type": "application/json",
"X-Auth-Token": settings.JITSU_SECRET_KEY,
"X-Auth-Token": settings.ANALYTICS_SECRET_KEY,
},
json={
"event_id": uuid.uuid4().hex,
@ -273,12 +273,12 @@ class OauthEndpoint(BaseAPIView):
"user": serialized_user,
"permissions": [],
}
if settings.JITSU_BASE_API:
if settings.ANALYTICS_BASE_API:
_ = requests.post(
settings.JITSU_BASE_API,
settings.ANALYTICS_BASE_API,
headers={
"Content-Type": "application/json",
"X-Auth-Token": settings.JITSU_SECRET_KEY,
"X-Auth-Token": settings.ANALYTICS_SECRET_KEY,
},
json={
"event_id": uuid.uuid4().hex,

View File

@ -79,5 +79,5 @@ if DOCKERIZED:
WEB_URL = os.environ.get("WEB_URL", "localhost:3000")
PROXY_BASE_URL = os.environ.get("PROXY_BASE_URL", False)
JITSU_SECRET_KEY = os.environ.get("JITSU_SECRET_KEY", False)
JITSU_BASE_API = os.environ.get("JITSU_BASE_API", False)
ANALYTICS_SECRET_KEY = os.environ.get("ANALYTICS_SECRET_KEY", False)
ANALYTICS_BASE_API = os.environ.get("ANALYTICS_BASE_API", False)

View File

@ -227,5 +227,5 @@ WEB_URL = os.environ.get("WEB_URL")
PROXY_BASE_URL = os.environ.get("PROXY_BASE_URL", False)
JITSU_SECRET_KEY = os.environ.get("JITSU_SECRET_KEY", False)
JITSU_BASE_API = os.environ.get("JITSU_BASE_API", False)
ANALYTICS_SECRET_KEY = os.environ.get("ANALYTICS_SECRET_KEY", False)
ANALYTICS_BASE_API = os.environ.get("ANALYTICS_BASE_API", False)

View File

@ -188,5 +188,5 @@ WEB_URL = os.environ.get("WEB_URL")
PROXY_BASE_URL = os.environ.get("PROXY_BASE_URL", False)
JITSU_SECRET_KEY = os.environ.get("JITSU_SECRET_KEY", False)
JITSU_BASE_API = os.environ.get("JITSU_BASE_API", False)
ANALYTICS_SECRET_KEY = os.environ.get("ANALYTICS_SECRET_KEY", False)
ANALYTICS_BASE_API = os.environ.get("ANALYTICS_BASE_API", False)