Skip to content

Commit

Permalink
solves #206
Browse files Browse the repository at this point in the history
  • Loading branch information
deinelieblings committed Sep 11, 2024
1 parent 701662b commit 977f736
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dao/crew.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/Viva-con-Agua/vcago/vmdb"
"github.com/Viva-con-Agua/vcapool"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo/options"
)

func CrewInsert(ctx context.Context, i *models.CrewCreate, token *vcapool.AccessToken) (result *models.Crew, err error) {
Expand Down Expand Up @@ -38,7 +39,9 @@ func CrewGet(ctx context.Context, i *models.CrewQuery, token *vcapool.AccessToke
}
filter := i.Filter()
result = new([]models.Crew)
if err = CrewsCollection.Find(ctx, filter, result); err != nil {
opt := options.Find().SetSort(bson.D{{Key: "name", Value: 1}})
opt.Collation = &options.Collation{Locale: "en", Strength: 2}
if err = CrewsCollection.Find(ctx, filter, result, opt); err != nil {
return
}
return
Expand Down

0 comments on commit 977f736

Please sign in to comment.