From e5a8a550b2c5ba653e7aa52577feb58bf1f6c47f Mon Sep 17 00:00:00 2001 From: jjeonghak Date: Wed, 27 Nov 2024 17:25:43 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EB=8C=80=EC=8B=9C=EB=B3=B4?= =?UTF-8?q?=EB=93=9C=20=ED=86=B5=EA=B3=84=20dto=20=EA=B5=AC=EC=A1=B0=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/server/src/task/service/task.service.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/server/src/task/service/task.service.ts b/apps/server/src/task/service/task.service.ts index 174cd3f..e65e111 100644 --- a/apps/server/src/task/service/task.service.ts +++ b/apps/server/src/task/service/task.service.ts @@ -462,16 +462,21 @@ export class TaskService { .andWhere('section.name = :name', { name: 'Done' }) .getCount(); - const contributorStatistic = await this.contributorRepository + const contributorStatisticRecord = await this.contributorRepository .createQueryBuilder('c') .leftJoin('account', 'a', 'c.userId = a.id') .leftJoin('task_assignee', 'ta', 'c.userId = ta.accountId') .where('c.projectId = :projectId OR ta.projectId IS NULL', { projectId }) .andWhere('ta.projectId = :projectId', { projectId }) - .select(['c.userId AS id', 'a.username AS username', 'COUNT(ta.id) AS count']) + .select([ + 'c.userId AS id', + 'a.username AS username', + 'a.profileImage AS profileImage', + 'COUNT(ta.id) AS count', + ]) .groupBy('c.userId') .getRawMany(); - contributorStatistic.map((statistic) => ({ + const contributorStatistic = contributorStatisticRecord.map((statistic) => ({ ...statistic, count: parseInt(statistic.count, 10), }));