mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 02:55:58 +01:00 
			
		
		
		
	added index and fixed vote button in infinite scroll
This commit is contained in:
		| @@ -90,6 +90,12 @@ | |||||||
| 					} | 					} | ||||||
| 				}); | 				}); | ||||||
|  |  | ||||||
|  | 				db.collection('objects').ensureIndex({_key :1, score: 1}, {background:true}, function(err) { | ||||||
|  | 					if(err) { | ||||||
|  | 						winston.error('Error creating index ' + err.message); | ||||||
|  | 					} | ||||||
|  | 				}); | ||||||
|  |  | ||||||
| 				db.collection('objects').ensureIndex({_key :1, value: -1}, {background:true}, function(err) { | 				db.collection('objects').ensureIndex({_key :1, value: -1}, {background:true}, function(err) { | ||||||
| 					if(err) { | 					if(err) { | ||||||
| 						winston.error('Error creating index ' + err.message); | 						winston.error('Error creating index ' + err.message); | ||||||
|   | |||||||
| @@ -456,6 +456,9 @@ SocketTopics.loadMore = function(socket, data, callback) { | |||||||
| 			}, | 			}, | ||||||
| 			'reputation:disabled': function(next) { | 			'reputation:disabled': function(next) { | ||||||
| 				next(null, parseInt(meta.config['reputation:disabled'], 10) === 1); | 				next(null, parseInt(meta.config['reputation:disabled'], 10) === 1); | ||||||
|  | 			}, | ||||||
|  | 			'downvote:disabled': function(next) { | ||||||
|  | 				next(null, parseInt(meta.config['downvote:disabled'], 10) === 1); | ||||||
| 			} | 			} | ||||||
| 		}, callback); | 		}, callback); | ||||||
| 	}); | 	}); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user