CoastalCommitsPastes/client/pages/api/posts/users-posts.ts
2022-11-09 19:46:12 -08:00

11 lines
175 B
TypeScript

import prisma from "app/prisma"
export const getPostsByUser = async (userId: number) => {
const posts = await prisma.post.findMany({
where: {
}
})
return posts
}