diff --git a/components/snapshot/Calendar.vue b/components/snapshot/Calendar.vue index f03bfc8..54b5688 100644 --- a/components/snapshot/Calendar.vue +++ b/components/snapshot/Calendar.vue @@ -5,7 +5,7 @@ import { useMediaQuery } from '@vueuse/core'; import ProgressSpinner from 'primevue/progressspinner'; import Calendar from 'primevue/calendar'; -import { Snapshot } from '~~/models/snapshot'; +import { CalendarEntry } from '~~/models/calendar-entry'; // Moving these interfaces to separate files makes TypeScript scream at you interface PrimeVueDate { @@ -54,7 +54,7 @@ const { error: calendarEntriesLoadError, data: calendarEntries, refresh: reloadCalendarEntries -} = useFetch( +} = useFetch( () => `/api/playlists/${playlistId}/snapshots?${queryString.value}`, { key: `snapshots-calendar-of-${playlistId}`, diff --git a/components/stats/FollowerGrowth.vue b/components/stats/FollowerGrowth.vue index 68ec9f9..ca65b2f 100644 --- a/components/stats/FollowerGrowth.vue +++ b/components/stats/FollowerGrowth.vue @@ -5,7 +5,7 @@ import ProgressSpinner from 'primevue/progressspinner'; import Dropdown from 'primevue/dropdown'; import Chart from 'primevue/chart'; -import { Snapshot } from '~~/models/snapshot'; +import { CalendarEntry } from '~~/models/calendar-entry'; const route = useRoute(); const playlistId = route.params.playlistId as string; @@ -55,7 +55,7 @@ const { pending, error, data, refresh } = await useLazyAsyncData( `playlist-${playlistId}-follower-growth`, async () => { const snapshots = ( - await $fetch( + await $fetch( `/api/playlists/${playlistId}/snapshots?sinceDate=${sinceDate.value}` ) ).reverse(); diff --git a/models/snapshot.ts b/models/calendar-entry.ts similarity index 73% rename from models/snapshot.ts rename to models/calendar-entry.ts index 35f6329..fa3027e 100644 --- a/models/snapshot.ts +++ b/models/calendar-entry.ts @@ -1,4 +1,4 @@ -export interface Snapshot { +export interface CalendarEntry { snapshotId: string; commitSha: string; dateCaptured: string;