Skip to content

Commit

Permalink
refactor: Rename function name
Browse files Browse the repository at this point in the history
  • Loading branch information
tomi committed Jan 17, 2024
1 parent 1d98969 commit 1257113
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class WorkflowStatisticsRepository extends Repository<WorkflowStatistics>
}
}

async queryNumWorkflowsUserHasWith5OrMoreProdExecs(userId: User['id']): Promise<number> {
async queryNumWorkflowsUserHasWithFiveOrMoreProdExecs(userId: User['id']): Promise<number> {
const numWorkflows = await this.createQueryBuilder('workflow_statistics')
.innerJoin(WorkflowEntity, 'workflow', 'workflow.id = workflow_statistics.workflowId')
.innerJoin(
Expand Down
4 changes: 3 additions & 1 deletion packages/cli/src/services/cta.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ export class CtaService {
async getBecomeCreatorCta(userId: User['id']) {
// There need to be at least 3 workflows with at least 5 executions
const numWfsWithOver5ProdExecutions =
await this.workflowStatisticsRepository.queryNumWorkflowsUserHasWith5OrMoreProdExecs(userId);
await this.workflowStatisticsRepository.queryNumWorkflowsUserHasWithFiveOrMoreProdExecs(
userId,
);

return numWfsWithOver5ProdExecutions >= 3;
}
Expand Down

0 comments on commit 1257113

Please sign in to comment.