mirror of
https://github.com/maciejpedzich/spotifyplaylistarchive.com.git
synced 2024-09-19 18:16:19 +02:00
Rename Snapshot back to CalendarEntry
This commit is contained in:
parent
7ef3bb14fe
commit
e2410ff6e7
@ -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}`,
|
||||||
|
@ -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();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export interface Snapshot {
|
export interface CalendarEntry {
|
||||||
snapshotId: string;
|
snapshotId: string;
|
||||||
commitSha: string;
|
commitSha: string;
|
||||||
dateCaptured: string;
|
dateCaptured: string;
|
Loading…
Reference in New Issue
Block a user