feat!: added PDF and screenshot archive support
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { prisma } from "@/lib/api/db";
|
||||
|
||||
export default async (userId: number, collectionId: number) => {
|
||||
const check: any = await prisma.collection.findFirst({
|
||||
where: {
|
||||
AND: {
|
||||
id: collectionId,
|
||||
OR: [{ ownerId: userId }, { members: { some: { userId } } }],
|
||||
},
|
||||
},
|
||||
include: { members: true },
|
||||
});
|
||||
|
||||
return check;
|
||||
};
|
||||
Reference in New Issue
Block a user