Continue work on brewery page, implement like system

This commit is contained in:
Aaron William Po
2023-04-23 17:25:39 -04:00
parent 9504da33d6
commit 58d30b605f
27 changed files with 699 additions and 125 deletions

View File

@@ -50,7 +50,7 @@ const getLikeCount = async (
) => {
const id = req.query.id as string;
const likes = await DBClient.instance.beerPostLike.count({
const likeCount = await DBClient.instance.beerPostLike.count({
where: { beerPostId: id },
});
@@ -58,7 +58,7 @@ const getLikeCount = async (
success: true,
message: 'Successfully retrieved like count.',
statusCode: 200,
payload: { likeCount: likes },
payload: { likeCount },
});
};