minor change

This commit is contained in:
Daniel 2023-06-15 16:18:47 +03:30
parent 4062ffc9f6
commit 93558bb791

View File

@ -9,7 +9,7 @@ export default async function getCollection(body: string) {
const collection = await prisma.collection.findFirst({ const collection = await prisma.collection.findFirst({
where: { where: {
id: Number(query.collectionId), id: query.collectionId,
isPublic: true, isPublic: true,
}, },
}); });
@ -20,12 +20,12 @@ export default async function getCollection(body: string) {
skip: query.cursor ? 1 : undefined, skip: query.cursor ? 1 : undefined,
cursor: query.cursor cursor: query.cursor
? { ? {
id: Number(query.cursor), id: query.cursor,
} }
: undefined, : undefined,
where: { where: {
collection: { collection: {
id: Number(query.collectionId), id: query.collectionId,
}, },
}, },
include: { include: {