fix: track events issue and env variables fixes (#2184)
* fix: track event fixes * fix: adding env variables to trubo
This commit is contained in:
parent
a53b428bbd
commit
6659cfc8b0
30 changed files with 903 additions and 971 deletions
|
|
@ -4,11 +4,6 @@ import { API_BASE_URL } from "helpers/common.helper";
|
|||
|
||||
import { ICurrentUserResponse, IGithubRepoInfo, IGithubServiceImportFormData } from "types";
|
||||
|
||||
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
|
||||
|
||||
const trackEvent =
|
||||
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
|
||||
|
||||
const integrationServiceType: string = "github";
|
||||
class GithubIntegrationService extends APIService {
|
||||
constructor() {
|
||||
|
|
@ -48,8 +43,7 @@ class GithubIntegrationService extends APIService {
|
|||
data
|
||||
)
|
||||
.then((response) => {
|
||||
if (trackEvent)
|
||||
trackEventServices.trackImporterEvent(response?.data, "GITHUB_IMPORTER_CREATE", user);
|
||||
trackEventServices.trackImporterEvent(response?.data, "GITHUB_IMPORTER_CREATE", user);
|
||||
return response?.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue