Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
raffis committed Apr 17, 2024
1 parent 06ddcd4 commit f3b644c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/database/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit f3b644c

Please sign in to comment.