Skip to content

Commit

Permalink
refactor: variable to constant
Browse files Browse the repository at this point in the history
  • Loading branch information
enaenen committed Dec 8, 2023
1 parent 723fcb2 commit 35969f1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/tag-log-v3/tag-log-v3.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 35969f1

Please sign in to comment.