func (s *MongoClient) UpdateProduct(person models.Person)(*mongo.SingleResult) {
filter := bson.M{"_id": bson.M{"$eq": person.ID}}
update := bson.M{
"$set":bson.M{
"firstname": person.Firstname,
"lastname": person.Lastname,
},
}
collection := s.client.Database("thepolyglotdeveloper").Collection("group")
ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
result:= collection.FindOneAndUpdate(ctx, filter,update)
return result
}