This commit is contained in:
Stephan D
2026-03-10 12:31:09 +01:00
parent d87e709f43
commit e77d1ab793
287 changed files with 2089 additions and 1550 deletions

View File

@@ -81,7 +81,7 @@ type computeImp struct {
func (a *computeImp) Build() any {
return bson.D{
{Key: string(a.field.Build()), Value: a.expression.Build()},
{Key: a.field.Build(), Value: a.expression.Build()},
}
}

View File

@@ -101,7 +101,9 @@ func (r *MongoRepository) executeQuery(ctx context.Context, queryFunc QueryFunc,
if err != nil {
return err
}
defer cursor.Close(ctx)
defer func() {
_ = cursor.Close(ctx)
}()
for cursor.Next(ctx) {
if err = decoder(cursor); err != nil {
@@ -165,7 +167,9 @@ func (r *MongoRepository) ListIDs(ctx context.Context, query builder.Query) ([]b
if err != nil {
return nil, err
}
defer cursor.Close(ctx)
defer func() {
_ = cursor.Close(ctx)
}()
var ids []bson.ObjectID
for cursor.Next(ctx) {
@@ -196,7 +200,9 @@ func (r *MongoRepository) ListPermissionBound(ctx context.Context, query builder
if err != nil {
return nil, err
}
defer cursor.Close(ctx)
defer func() {
_ = cursor.Close(ctx)
}()
result := make([]model.PermissionBoundStorable, 0)
@@ -226,7 +232,9 @@ func (r *MongoRepository) ListAccountBound(ctx context.Context, query builder.Qu
if err != nil {
return nil, err
}
defer cursor.Close(ctx)
defer func() {
_ = cursor.Close(ctx)
}()
result := make([]model.AccountBoundStorable, 0)