From 1c18fc2bf6481b24da9d89389adc8cf8fe2b479b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 26 Mar 2025 20:16:04 -0400 Subject: [PATCH] fix compile errors caused by mongo driver API changes --- document_internals.go | 2 +- registry.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/document_internals.go b/document_internals.go index c056d98..51a96cf 100644 --- a/document_internals.go +++ b/document_internals.go @@ -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() diff --git a/registry.go b/registry.go index 5dc0423..d4e5023 100644 --- a/registry.go +++ b/registry.go @@ -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)