From f3b644cedfe8d6954fd0b83639a39e9b83a5f8f0 Mon Sep 17 00:00:00 2001 From: Raffael Sahli Date: Wed, 17 Apr 2024 11:44:48 +0200 Subject: [PATCH] fix: lint --- internal/database/mongodb.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/database/mongodb.go b/internal/database/mongodb.go index a45b8ef..2f0b753 100644 --- a/internal/database/mongodb.go +++ b/internal/database/mongodb.go @@ -104,7 +104,7 @@ func (m *MongoDBRepository) SetupUser(ctx context.Context, database string, user func (m *MongoDBRepository) DropUser(ctx context.Context, database string, username string) error { command := &bson.D{primitive.E{Key: "dropUser", Value: username}} r := m.runCommand(ctx, database, command) - if _, err := r.DecodeBytes(); err != nil { + if _, err := r.Raw(); err != nil { return err } return nil @@ -168,7 +168,7 @@ func (m *MongoDBRepository) createUser(ctx context.Context, database string, use command := &bson.D{primitive.E{Key: "createUser", Value: username}, primitive.E{Key: "pwd", Value: password}, primitive.E{Key: "roles", Value: m.getRoles(database, roles)}} r := m.runCommand(ctx, database, command) - if _, err := r.DecodeBytes(); err != nil { + if _, err := r.Raw(); err != nil { return err } return nil @@ -178,7 +178,7 @@ func (m *MongoDBRepository) updateUserPasswordAndRoles(ctx context.Context, data command := &bson.D{primitive.E{Key: "updateUser", Value: username}, primitive.E{Key: "pwd", Value: password}, primitive.E{Key: "roles", Value: m.getRoles(database, roles)}} r := m.runCommand(ctx, database, command) - if _, err := r.DecodeBytes(); err != nil { + if _, err := r.Raw(); err != nil { return err } return nil