Skip to content

Commit

Permalink
add:오류확인로그추가
Browse files Browse the repository at this point in the history
  • Loading branch information
sooieese00 committed Nov 5, 2024
1 parent e64c293 commit 2ae5ca9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions controllers/reviewController.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,13 @@ const getReviewDetail = async (req, res) => {
// 마이페이지 리뷰 가져오기 (limit 옵션으로 제한된 개수 또는 전체)
const getMypageReview = async (req, res) => {
try {
console.log("getMypageReview called");

const user_id = req.params.user_id;
const limit = req.query.limit ? parseInt(req.query.limit) : null;

console.log("user_id:", user_id);

const reviews = await Review.findAll({
where: { user_id: user_id },
order: [['date', 'DESC']],
Expand All @@ -136,6 +140,8 @@ const getMypageReview = async (req, res) => {
],
});

console.log("reviews retrieved:", reviews);

// 리뷰가 없을 경우
if (reviews.length === 0) {
return res.status(200).json({
Expand Down

0 comments on commit 2ae5ca9

Please sign in to comment.