This commit is contained in:
cdle
2023-06-16 17:54:32 +08:00
parent 2b49c28efe
commit e9296b7bf3
2 changed files with 1 additions and 1 deletions
+1
View File
@@ -440,6 +440,7 @@ func SetPluginMethod(vm *goja.Runtime, uuid string, on_start bool, running func(
vm.Set("MongoClient", func(uri string) interface{} {
return &mongodb.MongoClient{
Uri: uri,
Vm: vm,
}
})
}
-1
View File
@@ -55,7 +55,6 @@ type Collection struct {
func (cl *Collection) InsertOne(insert map[string]interface{}) interface{} {
result, err := cl.collection.InsertOne(context.Background(), insert)
if err != nil {
panic(cl.Vm.NewGoError(err))
}
return result