Skip to content

Commit

Permalink
Merge pull request #1754 from Giveth/feat/issue-analytics-dashboard-34
Browse files Browse the repository at this point in the history
feat: ajusts quary to make it the same as allProjects query
  • Loading branch information
Reshzera authored Aug 23, 2024
2 parents 9bfd0a5 + 3eae98b commit 0210f4c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/repositories/projectRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,8 @@ export const totalProjectsPerDate = async (
): Promise<number> => {
const query = Project.createQueryBuilder('project');

query.andWhere(`project.statusId = ${ProjStatus.active}`);

if (fromDate) {
query.andWhere(`project."creationDate" >= '${fromDate}'`);
}
Expand All @@ -445,7 +447,9 @@ export const totalProjectsPerDate = async (
}

if (onlyListed) {
query.andWhere(`project."reviewStatus" = 'Listed'`);
query.andWhere(`project.reviewStatus = :reviewStatus`, {
reviewStatus: ReviewStatus.Listed,
});
}

if (networkId) {
Expand Down

0 comments on commit 0210f4c

Please sign in to comment.