Add story limiting for hotStories, not working on recentStories
This commit is contained in:
@@ -11,7 +11,7 @@ var R = require('ramda'),
|
|||||||
User = require('./../models/User');
|
User = require('./../models/User');
|
||||||
|
|
||||||
exports.hotJSON = function(req, res, next) {
|
exports.hotJSON = function(req, res, next) {
|
||||||
var story = Story.find({}).sort({'rank': -1, 'timePosted': -1});
|
var story = Story.find({}).sort({'rank': -1, 'timePosted': -1}).limit(100);
|
||||||
story.exec(function(err, stories) {
|
story.exec(function(err, stories) {
|
||||||
if (err) {
|
if (err) {
|
||||||
throw err;
|
throw err;
|
||||||
@@ -21,7 +21,7 @@ exports.hotJSON = function(req, res, next) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.recentJSON = function(req, res, next) {
|
exports.recentJSON = function(req, res, next) {
|
||||||
var story = Story.find({}).sort({'timePosted': -1});
|
var story = Story.find({}).sort({'timePosted': -1}).limit(100);
|
||||||
story.exec(function(err, stories) {
|
story.exec(function(err, stories) {
|
||||||
if (err) {
|
if (err) {
|
||||||
throw err;
|
throw err;
|
||||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user