|
@ -231,8 +231,13 @@ func List(author string, category string, tags []Tag, earliest, latest time.Time |
|
|
query["open"] = *open |
|
|
query["open"] = *open |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
stories := make([]Story, 0, 128) |
|
|
|
|
|
err := storyCollection.Find(query).Limit(limit).All(&stories) |
|
|
|
|
|
|
|
|
size := limit |
|
|
|
|
|
if size == 0 { |
|
|
|
|
|
size = 128 |
|
|
|
|
|
} |
|
|
|
|
|
stories := make([]Story, 0, size) |
|
|
|
|
|
|
|
|
|
|
|
err := storyCollection.Find(query).Limit(limit).Sort("-updatedDate").All(&stories) |
|
|
|
|
|
|
|
|
return stories, err |
|
|
return stories, err |
|
|
} |
|
|
} |
|
|