mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-11-03 20:45:58 +01:00 
			
		
		
		
	fixed the redis error when going to unread/recent if nextStart is missing
This commit is contained in:
		@@ -287,6 +287,9 @@ var path = require('path'),
 | 
			
		||||
 | 
			
		||||
			app.get('/unread', function (req, res, next) {
 | 
			
		||||
				var uid = (req.user) ? req.user.uid : 0;
 | 
			
		||||
				if(!req.user) {
 | 
			
		||||
					return res.json(403, 'not-allowed');
 | 
			
		||||
				}
 | 
			
		||||
				topics.getUnreadTopics(uid, 0, 19, function (err, data) {
 | 
			
		||||
					if(err) {
 | 
			
		||||
						return next(err);
 | 
			
		||||
@@ -298,6 +301,9 @@ var path = require('path'),
 | 
			
		||||
 | 
			
		||||
			app.get('/unread/total', function (req, res, next) {
 | 
			
		||||
				var uid = (req.user) ? req.user.uid : 0;
 | 
			
		||||
				if(!req.user) {
 | 
			
		||||
					return res.json(403, 'not-allowed');
 | 
			
		||||
				}
 | 
			
		||||
				topics.getTotalUnread(uid, function (err, data) {
 | 
			
		||||
					if(err) {
 | 
			
		||||
						return next(err);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user