diff --git a/back/bookReviewList.js b/back/bookReviewList.js index b4e59f84bc..ca2b886260 100644 --- a/back/bookReviewList.js +++ b/back/bookReviewList.js @@ -16,7 +16,7 @@ function spoilerFilter(reviewData, spoilerWord) { //리뷰 텍스트, 필터링 let excludedPostIDs = []; let post_obj = []; -async function bookList(post_id) { +async function bookList(UID,post_id) { //MYSQL 연결 console.log(post_id); const mysql = require('mysql2'); diff --git a/back/index.js b/back/index.js index 6e531df45d..36c2aaee47 100644 --- a/back/index.js +++ b/back/index.js @@ -82,8 +82,9 @@ app.post('/api/ScrollView', async(req, res) => { const data =await recommendAlgo.runQueries(UID); res.json(data); }else{//post page - console.log(UID); - const data = await reviewListAlgo.bookList(postID); + + const data = await reviewListAlgo.bookList(UID,postID); + res.json(data); } }); diff --git a/front/src/components/PostViewPage.js b/front/src/components/PostViewPage.js index 9ef6256464..d354a3303d 100644 --- a/front/src/components/PostViewPage.js +++ b/front/src/components/PostViewPage.js @@ -38,16 +38,19 @@ function PostViewPage() { .then((data)=>{ console.log("data: ",data); console.log("url??: ",data.url); - console.log(`{url??}: ${data.url}`); + console.log(`{url??}: ${data.url}`); const li_ = []; li_.push(