Merge pull request #82 from aaronpo97/81-beer-post-like-button-not-working-as-expected

Fix variable name in checkIfBeerPostIsLiked function
This commit is contained in:
Aaron Po
2024-04-14 18:25:37 -04:00
committed by GitHub

View File

@@ -73,7 +73,8 @@ export const checkIfBeerPostIsLiked = async (
res: NextApiResponse<z.infer<typeof APIResponseValidationSchema>>, res: NextApiResponse<z.infer<typeof APIResponseValidationSchema>>,
) => { ) => {
const user = req.user!; const user = req.user!;
const beerPostId = req.query.id as string;
const beerPostId = req.query.postId as string;
const alreadyLiked = await findBeerPostLikeByIdService({ const alreadyLiked = await findBeerPostLikeByIdService({
beerPostId, beerPostId,