12 lines
247 B
TypeScript
12 lines
247 B
TypeScript
import { prisma } from "@/lib/api/db";
|
|
|
|
export default async function (userId: number) {
|
|
const collections = await prisma.collection.findMany({
|
|
where: {
|
|
ownerId: userId,
|
|
},
|
|
});
|
|
|
|
return { response: collections, status: 200 };
|
|
}
|