Skip to content

Commit

Permalink
fix(db): projection in get_gaps (#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
grtlr authored Jul 28, 2022
1 parent eb212ec commit 9170c11
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/db/collections/milestone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,10 @@ impl MongoDb {
doc! { "is_synced": true },
FindOptions::builder()
.sort(doc! { "at.milestone_index": 1 })
.projection(doc! { "at": 1 })
.projection(doc! {
"milestone_index": "$at.milestone_index",
"milestone_timestamp": "$at.milestone_timestamp",
})
.build(),
)
.await?
Expand Down

0 comments on commit 9170c11

Please sign in to comment.