Skip to content

Commit

Permalink
reverse sort order
Browse files Browse the repository at this point in the history
  • Loading branch information
Sledro committed Nov 1, 2024
1 parent e01fd11 commit 34ff500
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ func (db *Database) GetTransactions(ctx context.Context, filter models.Filter, p
bson.D{{Key: "$count", Value: "total"}},
}},
{Key: "transactions", Value: bson.A{
bson.D{{Key: "$sort", Value: bson.D{{Key: "block_time", Value: 1}}}},
bson.D{{Key: "$sort", Value: bson.D{{Key: "block_time", Value: -1}}}},
bson.D{{Key: "$skip", Value: skip}},
bson.D{{Key: "$limit", Value: pageSize}},
}},
Expand Down

0 comments on commit 34ff500

Please sign in to comment.