Showing
1 changed file
with
1 additions
and
2 deletions
... | @@ -10,7 +10,7 @@ var board = mysql_odbc.init(); | ... | @@ -10,7 +10,7 @@ var board = mysql_odbc.init(); |
10 | 10 | ||
11 | router.get('/list/:page', function(req, res, next) { | 11 | router.get('/list/:page', function(req, res, next) { |
12 | var id = req.user; | 12 | var id = req.user; |
13 | - if(!id) res.redirect('/board/list') | 13 | + if(!id) res.redirect('/board/list/1') |
14 | else{ | 14 | else{ |
15 | var page = req.params.page; | 15 | var page = req.params.page; |
16 | var sql = "select idx, name, title, date_format(modidate,'%Y-%m-%d %H:%i:%s') modidate, " + | 16 | var sql = "select idx, name, title, date_format(modidate,'%Y-%m-%d %H:%i:%s') modidate, " + |
... | @@ -20,7 +20,6 @@ router.get('/list/:page', function(req, res, next) { | ... | @@ -20,7 +20,6 @@ router.get('/list/:page', function(req, res, next) { |
20 | if (err) console.error("err : " + err); | 20 | if (err) console.error("err : " + err); |
21 | var id = req.user.ID; | 21 | var id = req.user.ID; |
22 | var nickname = req.user.nickname; | 22 | var nickname = req.user.nickname; |
23 | - if(!id) nickname = "손님" // 수정 예정 | ||
24 | res.render('list.ejs', {'ID':id, 'nickname': nickname, title: '게시판 리스트', rows: rows}) | 23 | res.render('list.ejs', {'ID':id, 'nickname': nickname, title: '게시판 리스트', rows: rows}) |
25 | }) | 24 | }) |
26 | } | 25 | } | ... | ... |
-
Please register or login to post a comment