mirror of
https://github.com/Febbweiss/ProjectDeployer.git
synced 2026-03-04 22:25:38 +00:00
11 lines
378 B
JavaScript
11 lines
378 B
JavaScript
Deployments = new Mongo.Collection('deployments');
|
|
|
|
DeploymentService = {
|
|
list: function(id) {
|
|
var deployments = Deployments.find({}, {sort: {timestamp: -1}}),
|
|
altered = deployments.map(function(doc, index, cursor) {
|
|
return _.extend(doc, {index: deployments.count() - index});
|
|
});
|
|
return altered.slice(0, 10);
|
|
}
|
|
}; |