Files
the-biergarten-app/services/BeerComment/getBeerCommentCount.ts
Aaron William Po d8a8dad37f Refactor beer by id page
Extracted services to separate files.
2023-03-27 19:02:45 -04:00

12 lines
253 B
TypeScript

import DBClient from '@/prisma/DBClient';
const getBeerCommentCount = async (beerPostId: string) => {
const count = await DBClient.instance.beerComment.count({
where: { beerPostId },
});
return count;
};
export default getBeerCommentCount;