CoastalCommitsPastes/client/pages/api/posts/users-posts.ts

12 lines
175 B
TypeScript
Raw Normal View History

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