mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 20:13:49 +00:00
Refactor and formatting
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user