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({
where: {
id: Number(query.collectionId),
id: query.collectionId,
isPublic: true,
},
});
@ -20,12 +20,12 @@ export default async function getCollection(body: string) {
skip: query.cursor ? 1 : undefined,
cursor: query.cursor
? {
id: Number(query.cursor),
id: query.cursor,
}
: undefined,
where: {
collection: {
id: Number(query.collectionId),
id: query.collectionId,
},
},
include: {