debug model collection add history

This commit is contained in:
mr 2024-10-07 09:32:04 +02:00
parent 0efb852839
commit e28b87ce7b

View File

@ -3,6 +3,7 @@ package mongo
import ( import (
"context" "context"
"errors" "errors"
"fmt"
"slices" "slices"
"time" "time"
@ -275,7 +276,7 @@ func (m *MongoDB) LoadOne(id string, collection_name string) (*mongo.SingleResul
} }
filter := bson.M{"_id": id} filter := bson.M{"_id": id}
targetDBCollection := CollectionMap[collection_name] targetDBCollection := CollectionMap[collection_name]
fmt.Println("targetDBCollection", targetDBCollection, CollectionMap)
MngoCtx, cancel = context.WithTimeout(context.Background(), 10*time.Second) MngoCtx, cancel = context.WithTimeout(context.Background(), 10*time.Second)
defer cancel() defer cancel()