Setting stuff up for the first proper tests

This commit is contained in:
Caleb Gardner
2024-07-31 01:41:14 -05:00
parent cb53b7b831
commit f86cdb0554
4 changed files with 38 additions and 5 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ import (
"github.com/CalebQ42/darkstorm-server/internal/backend"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo/options"
)
type PortfolioProject struct {
@@ -25,7 +26,7 @@ func (b *BlogApp) Projects(languageFilter string) ([]PortfolioProject, error) {
if languageFilter != "" {
filter["language.language"] = languageFilter
}
res, err := b.portfolioCol.Find(context.Background(), filter)
res, err := b.portfolioCol.Find(context.Background(), filter, options.Find().SetSort(bson.M{"_id": 1}))
if err != nil {
return nil, err
}