@@ -104,7 +104,7 @@ func (m *MongoDBRepository) SetupUser(ctx context.Context, database string, user
104104func (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