This commit is contained in:
mr
2026-02-05 14:54:41 +01:00
parent 5798e16263
commit e32ba1e37a
3 changed files with 8 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ package mongo
import (
"context"
"errors"
"fmt"
"slices"
"time"
@@ -248,6 +249,7 @@ func (m *MongoDB) StoreOne(obj interface{}, id string, collection_name string) (
return "", 503, err
}
doc := map[string]interface{}{}
fmt.Println("sqdqsd", obj)
b, _ := bson.Marshal(obj)
bson.Unmarshal(b, &doc)
doc["_id"] = id