Skip to content

Commit

Permalink
cleaning more clearbit usages
Browse files Browse the repository at this point in the history
  • Loading branch information
epipav committed Nov 10, 2023
1 parent 1d4eb8c commit 0fd14b1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 46 deletions.
36 changes: 0 additions & 36 deletions backend/src/services/__tests__/organizationService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,6 @@ import OrganizationService from '../organizationService'

const db = null

const expectedEnriched = {
identities: [
{
name: 'crowd.dev',
platform: 'crowd',
},
],
description:
'Understand, grow, and engage your developer community with zero hassle. With crowd.dev, you can build developer communities that drive your business forward.',
emails: ['hello@crowd.dev', 'jonathan@crowd.dev', 'careers@crowd.dev'],
phoneNumbers: ['+42 424242'],
logo: 'https://logo.clearbit.com/crowd.dev',
tags: [],
twitter: {
handle: 'CrowdDotDev',
id: '1362101830923259908',
bio: 'Community-led Growth for Developer-first Companies.\nJoin our private beta. 👇',
followers: 107,
following: 0,
location: '🌍 remote',
site: 'https://t.co/GRLDhqFWk4',
avatar: 'https://pbs.twimg.com/profile_images/1419741008716251141/6exZe94-_normal.jpg',
},
linkedin: {
handle: 'company/crowddevhq',
},
crunchbase: {
handle: null,
},
employees: 5,
revenueRange: {
min: 0,
max: 1,
},
}

describe('OrganizationService tests', () => {
beforeEach(async () => {
await SequelizeTestUtils.wipeDatabase(db)
Expand Down
10 changes: 0 additions & 10 deletions backend/src/services/organizationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ import { LoggerBase } from '@crowd/logging'
import { IOrganization, IOrganizationIdentity, OrganizationMergeSuggestionType } from '@crowd/types'
import { IRepositoryOptions } from '@/database/repositories/IRepositoryOptions'
import getObjectWithoutKey from '@/utils/getObjectWithoutKey'
import { CLEARBIT_CONFIG, IS_TEST_ENV } from '../conf'
import MemberRepository from '../database/repositories/memberRepository'
import organizationCacheRepository from '../database/repositories/organizationCacheRepository'
import OrganizationRepository from '../database/repositories/organizationRepository'
import SequelizeRepository from '../database/repositories/sequelizeRepository'
import Error400 from '../errors/Error400'
import Plans from '../security/plans'
import telemetryTrack from '../segment/telemetryTrack'
import { IServiceOptions } from './IServiceOptions'
import merge from './helpers/merge'
Expand All @@ -35,14 +33,6 @@ export default class OrganizationService extends LoggerBase {
this.options = options
}

async shouldEnrich(enrichP) {
const isPremium = this.options.currentTenant.plan === Plans.values.growth
if (!isPremium) {
return false
}
return enrichP && (CLEARBIT_CONFIG.apiKey || IS_TEST_ENV)
}

async mergeAsync(originalId, toMergeId) {
const tenantId = this.options.currentTenant.id

Expand Down

0 comments on commit 0fd14b1

Please # to comment.