Rename Snapshot back to CalendarEntry

This commit is contained in:
Maciej Pędzich 2022-07-13 19:49:37 +02:00
parent 7ef3bb14fe
commit e2410ff6e7
3 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@ import { useMediaQuery } from '@vueuse/core';
import ProgressSpinner from 'primevue/progressspinner'; import ProgressSpinner from 'primevue/progressspinner';
import Calendar from 'primevue/calendar'; 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 // Moving these interfaces to separate files makes TypeScript scream at you
interface PrimeVueDate { interface PrimeVueDate {
@ -54,7 +54,7 @@ const {
error: calendarEntriesLoadError, error: calendarEntriesLoadError,
data: calendarEntries, data: calendarEntries,
refresh: reloadCalendarEntries refresh: reloadCalendarEntries
} = useFetch<Snapshot[]>( } = useFetch<CalendarEntry[]>(
() => `/api/playlists/${playlistId}/snapshots?${queryString.value}`, () => `/api/playlists/${playlistId}/snapshots?${queryString.value}`,
{ {
key: `snapshots-calendar-of-${playlistId}`, key: `snapshots-calendar-of-${playlistId}`,

View File

@ -5,7 +5,7 @@ import ProgressSpinner from 'primevue/progressspinner';
import Dropdown from 'primevue/dropdown'; import Dropdown from 'primevue/dropdown';
import Chart from 'primevue/chart'; import Chart from 'primevue/chart';
import { Snapshot } from '~~/models/snapshot'; import { CalendarEntry } from '~~/models/calendar-entry';
const route = useRoute(); const route = useRoute();
const playlistId = route.params.playlistId as string; const playlistId = route.params.playlistId as string;
@ -55,7 +55,7 @@ const { pending, error, data, refresh } = await useLazyAsyncData(
`playlist-${playlistId}-follower-growth`, `playlist-${playlistId}-follower-growth`,
async () => { async () => {
const snapshots = ( const snapshots = (
await $fetch<Snapshot[]>( await $fetch<CalendarEntry[]>(
`/api/playlists/${playlistId}/snapshots?sinceDate=${sinceDate.value}` `/api/playlists/${playlistId}/snapshots?sinceDate=${sinceDate.value}`
) )
).reverse(); ).reverse();

View File

@ -1,4 +1,4 @@
export interface Snapshot { export interface CalendarEntry {
snapshotId: string; snapshotId: string;
commitSha: string; commitSha: string;
dateCaptured: string; dateCaptured: string;