log
This commit is contained in:
parent
e44a6b65b7
commit
a6f2556050
@ -3,6 +3,7 @@ package mongo
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"cloud.o-forge.io/core/oc-lib/dbs"
|
"cloud.o-forge.io/core/oc-lib/dbs"
|
||||||
@ -153,7 +154,7 @@ func (m *MongoDB) UpdateOne(set interface{}, id string, collection_name string)
|
|||||||
targetDBCollection := CollectionMap[collection_name]
|
targetDBCollection := CollectionMap[collection_name]
|
||||||
MngoCtx, cancel = context.WithTimeout(context.Background(), 10*time.Second)
|
MngoCtx, cancel = context.WithTimeout(context.Background(), 10*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
fmt.Println(doc)
|
||||||
_, err := targetDBCollection.UpdateOne(MngoCtx, filter, dbs.InputToBson(doc, true))
|
_, err := targetDBCollection.UpdateOne(MngoCtx, filter, dbs.InputToBson(doc, true))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
m.Logger.Error().Msg("Couldn't update resource: " + err.Error())
|
m.Logger.Error().Msg("Couldn't update resource: " + err.Error())
|
||||||
|
Loading…
Reference in New Issue
Block a user