Refactor: move service logic out of api routes and into separate files

This commit is contained in:
Aaron William Po
2023-05-14 17:12:14 -04:00
parent 60e76089f3
commit 5c91c6ab08
11 changed files with 118 additions and 54 deletions

View 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;