${result[i].title}
+diff --git a/public/css/board.css b/public/css/board.css
index 36b8e1e..69c8d24 100644
--- a/public/css/board.css
+++ b/public/css/board.css
@@ -7,6 +7,7 @@ body {
padding: 0;
margin: 0;
background-color:#242424;
+ overflow: auto;
}
a {
text-decoration: none;
diff --git a/public/css/board_view_css.css b/public/css/board_view_css.css
index 50a9924..604f1a7 100644
--- a/public/css/board_view_css.css
+++ b/public/css/board_view_css.css
@@ -50,8 +50,7 @@ a {
padding: 0 5px;
}
.content{
- width: 100%;
- height: 50vh;
+ width: 100%;
text-align: left;
padding-left: 10px;
padding-right: 10px;
diff --git a/routes/likeRouter.js b/routes/likeRouter.js
index 6b336a9..219d7db 100644
--- a/routes/likeRouter.js
+++ b/routes/likeRouter.js
@@ -6,6 +6,18 @@ const template = require('../template/likes_list');
// prefix: /likes
+function dateFormat(date) {
+ var newdate = new Date(date);
+ let month = newdate.getMonth() + 1;
+ let day = newdate.getDate();
+
+ month = month >= 10 ? month : '0' + month;
+ day = day >= 10 ? day : '0' + day;
+
+ return newdate.getFullYear() + '.' + month + '.' + day + ' ';
+};
+
+
router.get('/', function(request, response) {
console.log(request.user);
if(!request.isAuthenticated()){
@@ -16,9 +28,15 @@ router.get('/', function(request, response) {
FROM post, liked
WHERE post.id = liked.postId and liked.userId=${request.user.id} group by post.id`,
function(err, result) {
- console.log(result);
+
+ if(result.length == 0){
+ response.send('');
+ }else{
+
var list ='';
- console.log(result[0].createdate)
+ var date = dateFormat(result[0].createdate);
+
for (var i = 0;i < result.length; i++) {
list += `
@@ -26,11 +44,11 @@ router.get('/', function(request, response) {
${result[i].title}
${result[i].title}
+