fix api topic is_uped

This commit is contained in:
alsotang 2017-10-18 11:04:28 +08:00
parent 68eb6f7044
commit be32fc6c13

View File

@ -94,7 +94,7 @@ var show = function (req, res, next) {
reply = _.pick(reply, ['id', 'author', 'content', 'ups', 'create_at', 'reply_id']);
reply.reply_id = reply.reply_id || null;
if (reply.ups && req.user && reply.ups.indexOf(req.user.id) != -1) {
if (reply.ups && req.user && reply.ups.indexOf(req.user._id) != -1) {
reply.is_uped = true;
} else {
reply.is_uped = false;