Skip to content

Commit f3b644c

Browse files
committed
fix: lint
1 parent 06ddcd4 commit f3b644c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/database/mongodb.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func (m *MongoDBRepository) SetupUser(ctx context.Context, database string, user
104104
func (m *MongoDBRepository) DropUser(ctx context.Context, database string, username string) error {
105105
command := &bson.D{primitive.E{Key: "dropUser", Value: username}}
106106
r := m.runCommand(ctx, database, command)
107-
if _, err := r.DecodeBytes(); err != nil {
107+
if _, err := r.Raw(); err != nil {
108108
return err
109109
}
110110
return nil
@@ -168,7 +168,7 @@ func (m *MongoDBRepository) createUser(ctx context.Context, database string, use
168168
command := &bson.D{primitive.E{Key: "createUser", Value: username}, primitive.E{Key: "pwd", Value: password},
169169
primitive.E{Key: "roles", Value: m.getRoles(database, roles)}}
170170
r := m.runCommand(ctx, database, command)
171-
if _, err := r.DecodeBytes(); err != nil {
171+
if _, err := r.Raw(); err != nil {
172172
return err
173173
}
174174
return nil
@@ -178,7 +178,7 @@ func (m *MongoDBRepository) updateUserPasswordAndRoles(ctx context.Context, data
178178
command := &bson.D{primitive.E{Key: "updateUser", Value: username}, primitive.E{Key: "pwd", Value: password},
179179
primitive.E{Key: "roles", Value: m.getRoles(database, roles)}}
180180
r := m.runCommand(ctx, database, command)
181-
if _, err := r.DecodeBytes(); err != nil {
181+
if _, err := r.Raw(); err != nil {
182182
return err
183183
}
184184
return nil

0 commit comments

Comments
 (0)