diff --git a/src/public/index.ejs b/src/public/index.ejs index c46e003..bd97dd0 100644 --- a/src/public/index.ejs +++ b/src/public/index.ejs @@ -618,7 +618,7 @@ public class Example { function loadSocket(){ socket.on("record", ({recordCount, recordSize}) => { - fileCountSpan.innerText = recordCount; + fileCountSpan.innerText = recordCount.toLocaleString(); totalFileSizeSpan.innerText = recordSize; }); } diff --git a/src/services/socket/recordInfoSocket.ts b/src/services/socket/recordInfoSocket.ts index 354aa23..2dac5f3 100644 --- a/src/services/socket/recordInfoSocket.ts +++ b/src/services/socket/recordInfoSocket.ts @@ -22,10 +22,10 @@ export class RecordInfoSocket { } private async getPayload(): Promise { - const records = await this.repo.getRecordCount(); + const recordCount = await this.repo.getRecordCount(); const size = (await this.repo.getTotalFileSize()) ?? 0; return { - recordCount: records.toLocaleString(), + recordCount, recordSize: ObjectUtils.sizeToHuman(size), }; } diff --git a/src/utils/typeings.ts b/src/utils/typeings.ts index 2544fda..5d9cebc 100644 --- a/src/utils/typeings.ts +++ b/src/utils/typeings.ts @@ -58,6 +58,6 @@ export type ProtectionLevel = "Encrypted" | "Password" | "None"; export type Awaitable = Promise | T; export type RecordInfoPayload = { - recordCount: string; + recordCount: number; recordSize: string; };