Refactor and formatting

This commit is contained in:
Aaron William Po
2023-09-29 20:48:19 -04:00
parent 39980eb8c3
commit eb6dbb2115
23 changed files with 152 additions and 128 deletions

View File

@@ -37,7 +37,7 @@ const sendLikeRequest = async (
};
if (alreadyLiked) {
await removeBeerPostLikeById(alreadyLiked.id);
await removeBeerPostLikeById({ beerLikeId: alreadyLiked.id });
jsonResponse.message = 'Successfully unliked beer post';
} else {
await createBeerPostLike({ id, user });
@@ -53,7 +53,7 @@ const getLikeCount = async (
) => {
const id = req.query.id as string;
const likeCount = await getBeerPostLikeCount(id);
const likeCount = await getBeerPostLikeCount({ beerPostId: id });
res.status(200).json({
success: true,