mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 10:42:08 +00:00
fix: use term 'count' for X-Total-Count header
This commit is contained in:
@@ -47,11 +47,11 @@ const getAllBeersByBrewery = async (
|
||||
},
|
||||
});
|
||||
|
||||
const pageCount = await DBClient.instance.beerPost.count({
|
||||
const count = await DBClient.instance.beerPost.count({
|
||||
where: { breweryId: id },
|
||||
});
|
||||
|
||||
res.setHeader('X-Total-Count', pageCount);
|
||||
res.setHeader('X-Total-Count', count);
|
||||
|
||||
res.status(200).json({
|
||||
message: 'Beers fetched successfully',
|
||||
|
||||
Reference in New Issue
Block a user