This commit is contained in:
Aaron William Po
2023-10-07 13:27:01 -04:00
parent 5b287ed2ac
commit 2ee12d351f
21 changed files with 346 additions and 210 deletions

View File

@@ -29,6 +29,7 @@ const getAllBeersByBrewery = async (
ibu: true,
abv: true,
createdAt: true,
updatedAt: true,
description: true,
postedBy: { select: { username: true, id: true } },
brewery: { select: { name: true, id: true } },

View File

@@ -19,7 +19,7 @@ const getBreweryPosts = async (
const pageNum = parseInt(req.query.page_num, 10);
const pageSize = parseInt(req.query.page_size, 10);
const breweryPosts = await getAllBreweryPosts(pageNum, pageSize);
const breweryPosts = await getAllBreweryPosts({ pageNum, pageSize });
const breweryPostCount = await DBClient.instance.breweryPost.count();
res.setHeader('X-Total-Count', breweryPostCount);