Skip to content

Commit 1bc6fec

Browse files
committed
fix: optional id param into relatory endpoint
1 parent 1646b20 commit 1bc6fec

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

backend/src/modules/time-trackers/dtos/get-date-time-trackers.dto.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
import { IsDateString, IsNotEmpty, IsString } from 'class-validator';
1+
import {
2+
IsDateString,
3+
IsNotEmpty,
4+
IsOptional,
5+
IsString,
6+
} from 'class-validator';
27

38
export class GetDateTimeTrackersDto {
49
@IsString()
510
@IsNotEmpty()
11+
@IsOptional()
612
id: string;
713

814
@IsDateString()

frontend/src/pages/HomePage.vue

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,7 @@ export default defineComponent({
1616
username: '',
1717
todayHours: '0:00',
1818
monthlyHours: '0:00',
19-
recentActivities: [
20-
{
21-
id: '',
22-
name: '',
23-
project: '',
24-
time: '11:11:11',
25-
active: true,
26-
},
27-
],
19+
recentActivities: [],
2820
}
2921
},
3022
methods: {
@@ -77,6 +69,8 @@ export default defineComponent({
7769
this.monthlyHours = this.hoursToHHMM(responseMonth[0].hours_in_month)
7870
7971
const responseTimeTrackerList = await getGenericEndPoint('time-trackers')
72+
console.log({ responseTimeTrackerList })
73+
8074
const lastThreeTimeTrackers = responseTimeTrackerList
8175
.sort((a, b) => new Date(b.created_at) - new Date(a.created_at))
8276
.slice(0, 3)

0 commit comments

Comments
 (0)