fix compile errors caused by mongo driver API changes
This commit is contained in:
		
							parent
							
								
									8668e89991
								
							
						
					
					
						commit
						1c18fc2bf6
					
				| @ -201,7 +201,7 @@ func incrementTagged(item interface{}) interface{} { | ||||
| 			} | ||||
| 		} | ||||
| 		counterColl := DB.Collection(COUNTER_COL) | ||||
| 		counterColl.UpdateOne(context.TODO(), bson.M{"collection": incTag.Name}, bson.M{"$set": bson.M{"collection": incTag.Name, "current": cur.Interface()}}, options.Update().SetUpsert(true)) | ||||
| 		counterColl.UpdateOne(context.TODO(), bson.M{"collection": incTag.Name}, bson.M{"$set": bson.M{"collection": incTag.Name, "current": cur.Interface()}}, options.UpdateOne().SetUpsert(true)) | ||||
| 
 | ||||
| 	} | ||||
| 	return rv.Elem().Interface() | ||||
|  | ||||
| @ -370,7 +370,7 @@ func innerWatch(coll *mongo.Collection) { | ||||
| 			counterColl := DB.Collection(COUNTER_COL) | ||||
| 			counterColl.UpdateOne(context.TODO(), bson.M{"collection": coll.Name()}, bson.M{"$set": bson.M{ | ||||
| 				"current": uid, | ||||
| 			}}, options.Update().SetUpsert(true)) | ||||
| 			}}, options.UpdateOne().SetUpsert(true)) | ||||
| 		} | ||||
| 
 | ||||
| 		fmt.Printf("%v\n", data) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user