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 cabc0e6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Deploy Dev

on:
push:
branches:
- dev
# on:
# push:
# branches:
# - dev

jobs:
deploy:
Expand Down
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 cabc0e6

Please sign in to comment.