Skip to content

Commit

Permalink
#36 글 상세보기 페이지에서 닉네임으로 나오도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
parksewon committed Dec 18, 2021
1 parent 5978ac6 commit 83b342f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions routes/boardRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,18 @@ router.get('/view', function(request, response){
if (err2) throw err2;

var title = result2[0].title;
var user_id = result2[0].userID;
var userId = result2[0].userId;
var date = result2[0].createdate;
var like_num = 10000; // 좋아요 연결 후 반영하기
var content = result2[0].content;

var html = board_view.HTML(title, user_id, date, like_num, content)
db.query(`SELECT nickname FROM user WHERE kakaoid = ?;`, [userId], function(err3, result3){

response.send(html);
var user_id = result3[0].nickname;

var html = board_view.HTML(title, user_id, date, like_num, content)
response.send(html);
})

});

Expand Down

0 comments on commit 83b342f

Please sign in to comment.