return object as a streak

This commit is contained in:
oleg 2016-01-07 19:34:41 +03:00
parent 0c119b0d67
commit 6a44a5f955
2 changed files with 3 additions and 3 deletions

View File

@ -171,7 +171,7 @@ BuildsCollection.prototype.getDoneStreak = function(params, callback) {
// tricky but effective streak counting inside filter goes below
var doneBuildsStreakCallback = _(this.slot()).once(),
doneBuildsStreak = 0;
doneBuildsStreak = {buildsCount: 0};
self.db.builds.find({
start: start,
@ -182,7 +182,7 @@ BuildsCollection.prototype.getDoneStreak = function(params, callback) {
return true;
}
if (build.status === 'done') {
doneBuildsStreak++;
doneBuildsStreak.buildsCount++;
}
},
limit: 1

View File

@ -32,7 +32,7 @@ div
p Current successfully streak:
if lastDoneBuild
span= this.state.project.doneBuildsStreak
span= this.state.project.doneBuildsStreak.buildsCount
else
| -