Merge pull request #2754 from omnivore-app/fix/api-rm-identify-call

Remove identify call from backend
This commit is contained in:
Jackson Harper 2023-09-12 10:09:17 +08:00 committed by GitHub
commit 4cd4a18aeb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,32 +36,6 @@ export class CreateIntercomAccount
}
}
@EventSubscriber()
export class IdentifySegmentUser implements EntitySubscriberInterface<Profile> {
listenTo() {
return Profile
}
afterInsert(event: InsertEvent<Profile>): Promise<void> {
try {
const profile = event.entity
analytics.identify({
userId: profile.user.id,
traits: {
name: profile.user.name,
email: profile.user.email,
source: profile.user.source,
env: env.server.apiEnv,
},
})
} catch (error) {
logger.info('error in sign up', error)
}
return Promise.resolve()
}
}
@EventSubscriber()
export class PublishNewUserEvent implements EntitySubscriberInterface<Profile> {
listenTo() {