Mukho

Fix error and add temp button

...@@ -45,11 +45,9 @@ ...@@ -45,11 +45,9 @@
45 <form class="form-subscribe" id="contactForm" data-sb-form-api-token="API_TOKEN"> 45 <form class="form-subscribe" id="contactForm" data-sb-form-api-token="API_TOKEN">
46 <!-- ID input--> 46 <!-- ID input-->
47 <div class="row"> 47 <div class="row">
48 - <div class="col"> 48 + <div class="row">
49 - <input class="form-control form-control-lg" id="IDBelow" type="text" placeholder="ID" data-sb-validations="required" /> 49 + <a class="btn btn-primary" href="/board/list">임시게시판</a>
50 - <div class="invalid-feedback text-white" data-sb-feedback="IDBelow:required">ID를 입력하세요.</div>
51 </div> 50 </div>
52 - <div class="col-auto"><button class="btn btn-primary btn-lg disabled" id="submitButton" type="submit">회원가입</button></div>
53 </div> 51 </div>
54 <!-- Submit success message--> 52 <!-- Submit success message-->
55 <!----> 53 <!---->
......
...@@ -14,9 +14,10 @@ router.get('/list/:page', function(req, res, next) { ...@@ -14,9 +14,10 @@ router.get('/list/:page', function(req, res, next) {
14 14
15 board.query(sql, function(err,rows) { 15 board.query(sql, function(err,rows) {
16 if (err) console.error("err : " + err); 16 if (err) console.error("err : " + err);
17 - var id = req.user; 17 + var id = req.user.ID;
18 - if(!id) id = "수정예정" 18 + var nickname = req.user.nickname;
19 - res.render('list.ejs', {'ID':id, title: '게시판 리스트', rows: rows}) 19 + if(!id) nickname = "손님" // 수정 예정
20 + res.render('list.ejs', {'ID':id, 'nickname': nickname, title: '게시판 리스트', rows: rows})
20 }) 21 })
21 }); 22 });
22 23
......
...@@ -45,11 +45,7 @@ ...@@ -45,11 +45,7 @@
45 <form class="form-subscribe" id="contactForm" data-sb-form-api-token="API_TOKEN"> 45 <form class="form-subscribe" id="contactForm" data-sb-form-api-token="API_TOKEN">
46 <!-- ID input--> 46 <!-- ID input-->
47 <div class="row"> 47 <div class="row">
48 - <div class="col"> 48 + <a class="btn btn-primary" href="/board/list">임시게시판</a>
49 - <input class="form-control form-control-lg" id="IDBelow" type="text" placeholder="ID" data-sb-validations="required" />
50 - <div class="invalid-feedback text-white" data-sb-feedback="IDBelow:required">ID를 입력하세요.</div>
51 - </div>
52 - <div class="col-auto"><button class="btn btn-primary btn-lg disabled" id="submitButton" type="submit">회원가입</button></div>
53 </div> 49 </div>
54 <!-- Submit success message--> 50 <!-- Submit success message-->
55 <!----> 51 <!---->
......