mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 10:42:08 +00:00
Refactor: move service logic out of api routes and into separate files
This commit is contained in:
11
src/services/BeerComment/findBeerCommentById.ts
Normal file
11
src/services/BeerComment/findBeerCommentById.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import DBClient from '@/prisma/DBClient';
|
||||
|
||||
const findBeerCommentById = async (id: string) => {
|
||||
const comment = await DBClient.instance.beerComment.findUnique({
|
||||
where: { id },
|
||||
});
|
||||
|
||||
return comment;
|
||||
};
|
||||
|
||||
export default findBeerCommentById;
|
||||
Reference in New Issue
Block a user