mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 10:42:08 +00:00
Refactor: begin reorganizing services dir.
- Renamed files and directories to reflect the new structure - Moved comment-related services to the 'comments' directory - Moved image-related services to the 'images' directory - Moved like-related services to the 'likes' directory - Moved post-related services to the 'posts' directory - Moved user-related services to the 'users' directory
This commit is contained in:
13
src/services/comments/BeerComment/getBeerCommentCount.ts
Normal file
13
src/services/comments/BeerComment/getBeerCommentCount.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import DBClient from '@/prisma/DBClient';
|
||||
|
||||
interface GetBeerCommentCountArgs {
|
||||
beerPostId: string;
|
||||
}
|
||||
|
||||
const getBeerCommentCount = async ({
|
||||
beerPostId,
|
||||
}: GetBeerCommentCountArgs): Promise<number> => {
|
||||
return DBClient.instance.beerComment.count({ where: { beerPostId } });
|
||||
};
|
||||
|
||||
export default getBeerCommentCount;
|
||||
Reference in New Issue
Block a user