Browse Source

changes: Reversed ordering in result.

module-madness-pointers
Gisle Aune 6 years ago
parent
commit
f7f0b76379
  1. 2
      models/changes/db.go

2
models/changes/db.go

@ -16,7 +16,7 @@ var submitMutex sync.Mutex
func list(query bson.M, limit int) ([]models.Change, error) { func list(query bson.M, limit int) ([]models.Change, error) {
changes := make([]models.Change, 0, 64) changes := make([]models.Change, 0, 64)
err := collection.Find(query).Limit(limit).Sort("date").All(&changes)
err := collection.Find(query).Limit(limit).Sort("-date").All(&changes)
return changes, err return changes, err
} }

Loading…
Cancel
Save