From a24135162557983883663ca04a52635c8547d75e Mon Sep 17 00:00:00 2001 From: Sangjin Yoon Date: Thu, 28 Nov 2024 16:36:03 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=EB=82=A0=EC=A7=9C=20=ED=98=95?= =?UTF-8?q?=EC=8B=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../name-server/src/database/query/dau-recorder.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/backend/name-server/src/database/query/dau-recorder.ts b/backend/name-server/src/database/query/dau-recorder.ts index f8291ffa..17003289 100644 --- a/backend/name-server/src/database/query/dau-recorder.ts +++ b/backend/name-server/src/database/query/dau-recorder.ts @@ -8,8 +8,9 @@ export class DAURecorder implements DAURecorderInterface { private clickhouseClient = ClickhouseDatabase.getInstance(); public async recordAccess(domain: string): Promise { - const dateString = new Date().toLocaleDateString(); - const values = [{ domain: domain.toLowerCase(), date: dateString, access: 1 }]; + const values = [ + { domain: domain.toLowerCase(), date: this.formatDate(new Date()), access: 1 }, + ]; try { await this.clickhouseClient.insert({ table: 'dau', @@ -20,4 +21,12 @@ export class DAURecorder implements DAURecorderInterface { console.error('ClickHouse Error:', error); } } + + private formatDate(date: Date): string { + const year = date.getFullYear(); + const month = String(date.getMonth() + 1).padStart(2, '0'); + const day = String(date.getDate()).padStart(2, '0'); + + return `${year}-${month}-${day}`; + } } From de8f0fbf7dc678763e67602d2b6db68723e4217c Mon Sep 17 00:00:00 2001 From: Sangjin Yoon Date: Thu, 28 Nov 2024 16:40:24 +0900 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20=EC=8A=A4=EC=9B=A8=EA=B1=B0=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/log/rank/dto/get-elapsed-time-rank-response.dto.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/console-server/src/log/rank/dto/get-elapsed-time-rank-response.dto.ts b/backend/console-server/src/log/rank/dto/get-elapsed-time-rank-response.dto.ts index 48203506..cd40c881 100644 --- a/backend/console-server/src/log/rank/dto/get-elapsed-time-rank-response.dto.ts +++ b/backend/console-server/src/log/rank/dto/get-elapsed-time-rank-response.dto.ts @@ -25,15 +25,15 @@ export class GetElapsedTimeRankResponseDto { example: [ { projectName: 'test059', - elapsedTime: 100, + value: 100, }, { projectName: 'test007', - elapsedTime: 110, + value: 110, }, { projectName: 'test079', - elapsedTime: 120, + value: 120, }, ], })