Skip to content

Commit 09b5013

Browse files
committed
order age groups by age asc
1 parent f86df75 commit 09b5013

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

service/age_group_service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func getAgeGroupsByBsonDocument(d primitive.D) ([]model.AgeGroup, error) {
2727
defer cancel()
2828

2929
queryOptions := options.FindOptions{}
30-
queryOptions.SetSort(bson.D{{"min_age", 1}})
30+
queryOptions.SetSort(bson.D{{"min_age", -1}})
3131

3232
cursor, err := ageGroupCollection.Find(ctx, d, &queryOptions)
3333
if err != nil {

0 commit comments

Comments
 (0)