|
@ -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 |
|
|
} |
|
|
} |
|
|