mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 20:13:49 +00:00
Refactor: further extract controller logic from routers
This commit is contained in:
@@ -8,7 +8,7 @@ interface GetBeerPostsByBeerStyleIdArgs {
|
||||
pageNum: number;
|
||||
}
|
||||
|
||||
const getBeerPostsByBeerStyleId = async ({
|
||||
const getAllBeerPostsByBreweryId = async ({
|
||||
pageNum,
|
||||
pageSize,
|
||||
breweryId,
|
||||
@@ -44,4 +44,4 @@ const getBeerPostsByBeerStyleId = async ({
|
||||
return beers;
|
||||
};
|
||||
|
||||
export default getBeerPostsByBeerStyleId;
|
||||
export default getAllBeerPostsByBreweryId;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import DBClient from '@/prisma/DBClient';
|
||||
|
||||
const getBeerPostLikeCount = async ({ beerPostId }: { beerPostId: string }) =>
|
||||
const getBeerPostLikeCountByBeerPostId = async ({ beerPostId }: { beerPostId: string }) =>
|
||||
DBClient.instance.beerPostLike.count({ where: { beerPostId } });
|
||||
|
||||
export default getBeerPostLikeCount;
|
||||
export default getBeerPostLikeCountByBeerPostId;
|
||||
|
||||
Reference in New Issue
Block a user