Skip to content

Commit

Permalink
Hotfix : 안드로이드 http요청에서 Delete에 body를 못넣는 문제로 인한 라우팅 수정 2
Browse files Browse the repository at this point in the history
  • Loading branch information
winocreative committed Jun 7, 2023
1 parent 5429ebf commit 1b03774
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions server/src/controller/comment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ const del = async (req, res) => {
return res.status(result.code).send(result.response);
}
const likePost = async (req, res) => { //addLike
const {medicineId} = req.params;
const {commentId} = req.body;
const {medicineId, commentId} = req.params;
const {userId} = req.verifiedToken;
const result = await addLike(userId, commentId);
return res.status(result.code).send(result.response);
Expand Down
2 changes: 1 addition & 1 deletion server/src/routes/medicine/comment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ router.patch("/", verifyAccessToken, commentController.patch); //UPDATE
router.delete("/:medicineId/:medicineId/:commentId", verifyAccessToken, commentController.del); //DELETE

// Like
router.post("/:medicineId/like", verifyAccessToken, commentController.likePost); //CREATE
router.post("/:medicineId/like/:commentId", verifyAccessToken, commentController.likePost); //CREATE
router.delete("/:medicineId/like/:commentId", verifyAccessToken, commentController.likeDelete); //DELETE
module.exports = router;

0 comments on commit 1b03774

Please sign in to comment.