fix: log error to prevent headers already sent

retry on uniq index fail
This commit is contained in:
Barış Soner Uşaklı
2019-01-24 12:42:36 -05:00
parent 7524d3c33b
commit a22a3a9861
2 changed files with 5 additions and 1 deletions

View File

@@ -3,6 +3,7 @@
var async = require('async');
var nconf = require('nconf');
var winston = require('winston');
var user = require('../user');
var meta = require('../meta');
@@ -172,7 +173,7 @@ topicsController.get = function getTopic(req, res, callback) {
if (req.loggedIn) {
topics.markAsRead([tid], req.uid, function (err, markedRead) {
if (err) {
return callback(err);
return winston.error(err);
}
if (markedRead) {
topics.pushUnreadCount(req.uid);