File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
apps/nango_worker/src/activities
libs/data-access-layer/src/old/apps/data_sink_worker/repo Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {
1111 getNangoCloudRecords ,
1212 initNangoCloudClient ,
1313} from '@crowd/nango'
14- import { AuthProvider , IntegrationResultType } from '@crowd/types'
14+ import { IntegrationResultType } from '@crowd/types'
1515
1616import { svc } from '../main'
1717import { IProcessNangoWebhookArguments } from '../types'
Original file line number Diff line number Diff line change 11import { DbStore , RepositoryBase } from '@crowd/database'
22import { Logger } from '@crowd/logging'
33
4- import { IManualAffiliationData , IWorkExperienceData } from './memberAffiliation.data'
4+ import {
5+ IManualAffiliationData ,
6+ IOrganizationMemberCount ,
7+ IWorkExperienceData ,
8+ } from './memberAffiliation.data'
59
610export default class MemberAffiliationRepository extends RepositoryBase < MemberAffiliationRepository > {
711 private BLACKLISTED_TITLES = [ 'Investor' , 'Mentor' , 'Board Member' ]
@@ -67,12 +71,12 @@ export default class MemberAffiliationRepository extends RepositoryBase<MemberAf
6771
6872 public async findMemberCountEstimateOfOrganizations (
6973 organizationIds : string [ ] ,
70- ) : Promise < IWorkExperienceData | null > {
71- const result = await this . db ( ) . oneOrNone (
74+ ) : Promise < IOrganizationMemberCount [ ] | null > {
75+ const result = await this . db ( ) . manyOrNone (
7276 `
7377 SELECT
7478 osa."organizationId",
75- sum(osa."memberCount") AS total_count
79+ sum(osa."memberCount") AS "memberCount
7680 FROM "organizationSegmentsAgg" osa
7781 WHERE osa."segmentId" IN (
7882 SELECT id
You can’t perform that action at this time.
0 commit comments