diff --git a/src/components/adminAlbum/DownloadSections.tsx b/src/components/adminAlbum/DownloadSections.tsx index 1e07f75..861d1ef 100644 --- a/src/components/adminAlbum/DownloadSections.tsx +++ b/src/components/adminAlbum/DownloadSections.tsx @@ -7,12 +7,10 @@ import { Input, InputSelect } from 'components/form/Input' import { DownloadProvider } from 'utils/consts' type Download = Prisma.downloadsGetPayload<{ - select: { title: true } - include: { links: { select: { provider: true; directUrl: true; url: true; url2: true } } } + select: { title: true; links: { select: { provider: true; url: true; url2: true; directUrl: true } } } }> const defaultLink = { provider: DownloadProvider.MEDIAFIRE, url: null, url2: null, directUrl: null } -//@ts-ignore const defaultSection: Download = { title: '', links: [defaultLink] } interface Props { diff --git a/src/pages/admin/album/[id].astro b/src/pages/admin/album/[id].astro index 4a3da69..ddbb767 100644 --- a/src/pages/admin/album/[id].astro +++ b/src/pages/admin/album/[id].astro @@ -30,8 +30,10 @@ const album = await prismaClient.albums.findUnique({ } }, stores: { select: { provider: true, url: true } }, - downloads: { select: { title: true }, include: { links: true } }, - discs: true + downloads: { + select: { title: true, links: { select: { provider: true, url: true, url2: true, directUrl: true } } } + }, + discs: { select: { number: true, body: true } } } })