Merge remote-tracking branch 'origin/superGroup' into superGroup

pull/236/head
Gordon 3 years ago
commit 3610525c88

@ -1106,7 +1106,7 @@ func (d *DataBases) RemoveGroupFromUser(ctx, sCtx context.Context, groupID strin
}) })
} }
c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cUserToSuperGroup) c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cUserToSuperGroup)
_, err := c.UpdateOne(sCtx, bson.M{"user_id": userID}, bson.M{"$pull": bson.M{"group_id_list": groupID}}) _, err := c.UpdateOne(sCtx, bson.M{"user_id": bson.M{"$in": userID}}, bson.M{"$pull": bson.M{"group_id_list": groupID}})
if err != nil { if err != nil {
return utils.Wrap(err, "UpdateOne transaction failed") return utils.Wrap(err, "UpdateOne transaction failed")
} }

Loading…
Cancel
Save