forked from github/plane
chore: rename analytics env variable keys (#455)
This commit is contained in:
parent
7fd775ab05
commit
698718aa8d
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user