mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-05-24 17:01:09 -04:00
Clean ENV
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import { Request } from 'express'
|
||||
import { trackAuditEvent } from 'shared/audit-events'
|
||||
import { PostHog } from 'posthog-node'
|
||||
import { isProd, log } from 'shared/utils'
|
||||
import { PROD_CONFIG } from 'common/envs/prod'
|
||||
import { DEV_CONFIG } from 'common/envs/dev'
|
||||
import {Request} from 'express'
|
||||
import {trackAuditEvent} from 'shared/audit-events'
|
||||
import {PostHog} from 'posthog-node'
|
||||
import {log} from 'shared/utils'
|
||||
import {ENV_CONFIG} from "common/envs/constants";
|
||||
|
||||
const key = isProd() ? PROD_CONFIG.posthogKey : DEV_CONFIG.posthogKey
|
||||
const key = ENV_CONFIG.posthogKey
|
||||
|
||||
const client = new PostHog(key, {
|
||||
host: 'https://us.i.posthog.com',
|
||||
@@ -35,7 +34,7 @@ export const trackPublicEvent = async (
|
||||
properties?: any
|
||||
) => {
|
||||
const allProperties = Object.assign(properties ?? {}, {})
|
||||
const { commentId, ...data } = allProperties
|
||||
const {commentId, ...data} = allProperties
|
||||
try {
|
||||
client.capture({
|
||||
distinctId: userId,
|
||||
|
||||
Reference in New Issue
Block a user