From 35969f18451693b595af6ae5dbcce078377e0509 Mon Sep 17 00:00:00 2001 From: space Date: Sat, 9 Dec 2023 04:21:16 +0900 Subject: [PATCH] refactor: variable to constant --- src/tag-log-v3/tag-log-v3.controller.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/tag-log-v3/tag-log-v3.controller.ts b/src/tag-log-v3/tag-log-v3.controller.ts index d59e9cd..c9c9566 100644 --- a/src/tag-log-v3/tag-log-v3.controller.ts +++ b/src/tag-log-v3/tag-log-v3.controller.ts @@ -97,9 +97,8 @@ export class TagLogController { const InOutLogPerDays: InOutLogPerDay[] = groupLogsByDay(results, TWELVE_HOURS_IN_SECONDS); - const twelveHoursInSeconds = TWELVE_HOURS_IN_SECONDS; const filteredMonthlyAccumulationTime = InOutLogPerDays.reduce( - (prev, result) => result.getDurationSecondWithFilter(twelveHoursInSeconds) + prev, 0, + (prev, result) => result.getDurationSecondWithFilter(TWELVE_HOURS_IN_SECONDS) + prev, 0, ); return { @@ -186,8 +185,7 @@ export class TagLogController { date, ); //todo: change to all tag (and check plus null value) - const twelveHoursInSeconds = TWELVE_HOURS_IN_SECONDS; - const resultPerDay : InOutLogPerDay[] = groupLogsByDay(resultMonth, twelveHoursInSeconds); + const resultPerDay : InOutLogPerDay[] = groupLogsByDay(resultMonth, TWELVE_HOURS_IN_SECONDS); // 하루 최대 인정시간 합 const resultDaySumWithFilter = resultPerDay.reduce(