Просмотр исходного кода

revert changes in modesl/comment

sou 7 лет назад
Родитель
Сommit
36918b7646
2 измененных файлов с 2 добавлено и 6 удалено
  1. 2 4
      lib/models/comment.js
  2. 0 2
      lib/util/slack.js

+ 2 - 4
lib/models/comment.js

@@ -36,10 +36,8 @@ module.exports = function(crowi) {
           debug('Error on saving comment.', err);
           debug('Error on saving comment.', err);
           return reject(err);
           return reject(err);
         }
         }
-        data.populate('page', function(err, datas) {
-          debug('Comment saved.', datas);
-          return resolve(datas);
-        });
+        debug('Comment saved.', data);
+        return resolve(data);
       });
       });
     });
     });
   };
   };

+ 0 - 2
lib/util/slack.js

@@ -109,7 +109,6 @@ module.exports = function(crowi) {
       text: body,
       text: body,
       mrkdwn_in: ['text'],
       mrkdwn_in: ['text'],
     };
     };
-
     if (user.image) {
     if (user.image) {
       attachment.author_icon = user.image;
       attachment.author_icon = user.image;
     }
     }
@@ -138,7 +137,6 @@ module.exports = function(crowi) {
       text: body,
       text: body,
       mrkdwn_in: ['text'],
       mrkdwn_in: ['text'],
     };
     };
-
     if (user.image) {
     if (user.image) {
       attachment.author_icon = user.image;
       attachment.author_icon = user.image;
     }
     }