mirror of
https://github.com/jorgev259/soc_site-astro.git
synced 2025-06-29 07:57:41 +00:00
Fix album edit initial query
This commit is contained in:
parent
6cef84a358
commit
e03508f57c
2 changed files with 5 additions and 5 deletions
|
|
@ -7,12 +7,10 @@ import { Input, InputSelect } from 'components/form/Input'
|
||||||
import { DownloadProvider } from 'utils/consts'
|
import { DownloadProvider } from 'utils/consts'
|
||||||
|
|
||||||
type Download = Prisma.downloadsGetPayload<{
|
type Download = Prisma.downloadsGetPayload<{
|
||||||
select: { title: true }
|
select: { title: true; links: { select: { provider: true; url: true; url2: true; directUrl: true } } }
|
||||||
include: { links: { select: { provider: true; directUrl: true; url: true; url2: true } } }
|
|
||||||
}>
|
}>
|
||||||
|
|
||||||
const defaultLink = { provider: DownloadProvider.MEDIAFIRE, url: null, url2: null, directUrl: null }
|
const defaultLink = { provider: DownloadProvider.MEDIAFIRE, url: null, url2: null, directUrl: null }
|
||||||
//@ts-ignore
|
|
||||||
const defaultSection: Download = { title: '', links: [defaultLink] }
|
const defaultSection: Download = { title: '', links: [defaultLink] }
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,10 @@ const album = await prismaClient.albums.findUnique({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
stores: { select: { provider: true, url: true } },
|
stores: { select: { provider: true, url: true } },
|
||||||
downloads: { select: { title: true }, include: { links: true } },
|
downloads: {
|
||||||
discs: true
|
select: { title: true, links: { select: { provider: true, url: true, url2: true, directUrl: true } } }
|
||||||
|
},
|
||||||
|
discs: { select: { number: true, body: true } }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue