|
@@ -2,10 +2,10 @@ Deployments = new Mongo.Collection('deployments');
|
|
|
|
|
|
|
|
DeploymentService = {
|
|
DeploymentService = {
|
|
|
list: function(id) {
|
|
list: function(id) {
|
|
|
- var deployments = Deployments.find(),
|
|
|
|
|
|
|
+ var deployments = Deployments.find({}, {sort: {timestamp: -1}}),
|
|
|
altered = deployments.map(function(doc, index, cursor) {
|
|
altered = deployments.map(function(doc, index, cursor) {
|
|
|
return _.extend(doc, {index: deployments.count() - index});
|
|
return _.extend(doc, {index: deployments.count() - index});
|
|
|
});
|
|
});
|
|
|
- return altered;
|
|
|
|
|
|
|
+ return altered.slice(0, 10);
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|