Skip to content

Commit

Permalink
refactor: ♻️ logtime ms => min 단위 통일
Browse files Browse the repository at this point in the history
  • Loading branch information
jpham005 committed Nov 27, 2023
1 parent 5586db2 commit a4761bd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 34 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/deploy-dev.yml

This file was deleted.

5 changes: 4 additions & 1 deletion app/src/dailyActivity/dailyActivity.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ export class DailyActivityService {

recordMap.set(timestamp, [
...prevRecords,
{ type: record.type, value: record.value },
{
type: record.type,
value: Math.floor(record.value / DateWrapper.MIN),
},
]);

return recordMap;
Expand Down
3 changes: 2 additions & 1 deletion app/src/dailyLogtime/dailyLogtime.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Injectable } from '@nestjs/common';
import type { IntRecord } from 'src/common/models/common.valueRecord.model';
import type { DateRange } from 'src/dateRange/dtos/dateRange.dto';
import { DailyLogtimeDaoImpl } from './db/dailyLogtime.database.dao';
import { DateWrapper } from 'src/dateWrapper/dateWrapper';

@Injectable()
export class DailyLogtimeService {
Expand All @@ -23,7 +24,7 @@ export class DailyLogtimeService {

return {
at: new Date(year, month - 1),
value,
value: Math.floor(value / DateWrapper.MIN),
};
});
}
Expand Down

0 comments on commit a4761bd

Please sign in to comment.